Logo image

|Short tips, great ideas

How To Remove The 'Disabled On Upgrade' Warning In Ubuntu Software Center After Distribution Upgrade


If you are familiar with upgrading Ubuntu then you probably noticed that, when you perform a distribution upgrade, Ubuntu disables all third-party software sources (i.e. PPA) and appends the following sentence to the beginning of each PPA line (as viewed in Ubuntu Software Center => Software Sources):
disabled on upgrade to quantal

If you find this sentence annoying and want to remove it, then follow the instructions below.

To achieve this, we are going to use the sed tool which a Linux command-line utility for performing special operations on text files such as removing a line, matching a pattern and so on.

Before we start, it is important to know that, when you add a PPA to your system, Ubuntu creates a .list file which holds all necessary informations to get software from this PPA. This file is usually stored within this directory:

cd /etc/apt/sources.list.d

To remove the disabled on upgrade to quantal statement, run the following commands in a terminal:

cd /etc/apt/sources.list.d/
sudo sed -i".backup" 's/#.*//' *.list

And that is all there is to it, with just two lines of commands, we have successfully deleted the annoying sentence:

A little explanation:

sudo sed -i".backup" 's/#.*//' *.list performs the following operations:

  • The -i".backup" option tells sed to create a backup file before doing any operation so in case something went wrong, you can easily restore the original files.
  • 's/#.*//' basically tells sed to remove all sentences that begin with the # symbol. In other words, this is the command that deletes the disabled on upgrade to quantal statement (It uses regular expressions).
If you have any questions, don't hesitate to drop a comment below.


Post a Comment