Distribution Upgrade
The most simple solution is to upgrade your Ubuntu instance to the newest release:
1 |
sudo apt-get dist-upgrade |
if the distribution upgrade is not an option right now, you can update the sources url for the Ubuntu repositories to find the old packages.
Update Packages Url
You can use the sed
command to update the sources in /etc/apt/sources.list
file to the new location for old package repositories2.
Run the following command to update archive.ubuntu.com
and security.ubuntu.com
package repository4 URLs with old-releases.ubuntu.com
. Since the normal Ubuntu releases link to the archive
and security
URLs, the support will be removed after their live cycle of 9 months and respective repositories3 moved to
1 2 3 4 5 |
sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list **Linux Mint additionally requires the execution of this command:** sudo sed -i -e 's/archive.ubuntu.com\|security.ubuntu.com/old-releases.ubuntu.com/g' /etc/apt/sources.list.d/official-package-repositories.list |
To check whether there are other files in /etc/apt/sources.list.d/
which need to be updated, use the following grep
command.
1 |
grep -E 'archive.ubuntu.com|security.ubuntu.com' /etc/apt/sources.list.d/* |
That’s it. Now you can update your sources again.
1 |
sudo apt-get update |