How to disable all the PPAs at once

When you want to update your Ubuntu system, you need to disable all the PPAs that you enabled while using for smoother update experience and avoid problems. So, you need to disable all the PPAs by toggling the checkboxes in the software-properties-gtk program. But it is a tedious work.

You can actually do this same thing quite easily. Follow this -

  1. Open a terminal using Ctrl+Alt+Tab
  2. cd to the /etc/apt/sources.list.d directory using command
        cd /etc/apt/sources.list.d
        
  1. While in that directory use the following command to put a # in front of every deb lines
        sudo sed -i 's/^deb/#deb/' *
        

Voila!