You need to add them all back/re-enabled them individually by uncommenting the lines in the files in the /etc/apt/sources.list.d/ directory.
Though upgrade time is a good time to reevaluate if you need the PPA in the first place if you were just using one to get a newer version of a package.
I have created a couple of scripts to both enable (re-enable) and disable PPAs, specially after an upgrade. Here they are:
PPA re-enable script
#! /bin/bash
# PPA re-enable script
# Use: ppa-reenable source.list
# to reenable a PPA without its source line
# Use: ppa-reenable src source.list
# to reenable a PPA with its source line
mod=1
file="$1"
if [ $1 == "src" ]; then mod=""; file="$2"; fi;
sudo sed -i "${mod}s/^# \(.*\) \(disabled on upgrade.*\)\?/\1/" "$file"
PPA disable script
#! /bin/bash
# PPA disable script
# Use: ppa-disable source.list
# to disable the PPA completely
# Use: ppa-disable src source.list
# to disable the source of the PPA only
file="${1}"
mod=""
# If its only needed to disable the source
if [ $1 = "src" ]; then mod="2"; file="${2}"; fi;
# If source line is disabled, don't comment it out
second="`sed -n 2p \"$file\"`"
second="${second:0:1}"
if ( [ $second == "#" ] && [ $mod != "2" ] ); then
mod="1"
fi
sudo sed -i "${mod}s/^/# /" "$file"
The sudo is included so you can store this script in your home bin directory
You need to add them all back/re-enabled them individually by uncommenting the lines in the files in the
/etc/apt/sources.list.d/
directory.Though upgrade time is a good time to reevaluate if you need the PPA in the first place if you were just using one to get a newer version of a package.
I wrote a bash script that removes the leading hash character from all files in
sources.list.d
that were disabled during the upgrade.The following code is for upgrading
raring
sources tosaucy
.If you want to keep the suffix
# disabled on upgrade to ...
, useif you want to delete the suffix
# disabled on upgrade to ...
, useHere's a python script that uses the Python APT API to find and enable such sources, while setting the release to the current release:
If you run it without
sudo
, it won't be able to save changes, but it will show which sources would be enabled. Run withsudo
to save the changes.I have created a couple of scripts to both enable (re-enable) and disable PPAs, specially after an upgrade. Here they are:
PPA re-enable script
PPA disable script
The
sudo
is included so you can store this script in your home bin directoryTo check and automatically update the source.list file, I created a script using
curl
andcodename
as follows.