How to install software or upgrade from an old unsupported release?
Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:
$ sudo apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Couldn't find package vlc 4 12 Answers
The repositories for older releases that are not supported (like 11.04, 11.10 and 13.04) get moved to an archive server. There are repositories available at .
The reason for this is that it is now out of support and no longer receiving updates and security patches.
I would urge you to consider a supported distribution. If your computer is too old in terms of memory or processor then you should consider a distribution such as Lubuntu or Xubuntu.
If you want to continue using an outdated release then edit /etc/apt/sources.list and change archive.ubuntu.com and security.ubuntu.com to old-releases.ubuntu.com.
You can do this with sed:
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com| /etc/apt/sources.listthen update with:
sudo apt-get update && sudo apt-get dist-upgradeSometimes, it might be faster to create backups of your system and reinstall using supported release instead.
Source: Can I keep using Ubuntu 9.04 if it's outdated?
To upgrade to a new release:
Once you have performed the above steps to switch to the old-releases mirrors, update the Update Manager and then do do-release-upgrade:
sudo apt-get update
sudo apt-get install ubuntu-release-upgrader-core
sudo do-release-upgradeSee also EOLUpgrades - Community Help Wiki.
12What are 404 errors
The 404 or Not Found error message is a HTTP standard response code indicating that the client was able to communicate with the server, but the server could not find what was requested.
The web site hosting server will typically generate "404 - Page Not Found" web page, when users attempts to follow a broken or dead link.
Why are we facing 404 errors
Ubuntu follows the approach of two different release cycles:
Normal Ubuntu releases are supported for 9 months. LTS releases are supported for 5 years.
Past releases may have different support schedules (for example, normal releases (before 13.04) used to be supported for 18 months, while LTS releases (before 12.04) used to be supported for 3 years on the desktop and 5 years on the server).
EOL: Once the support period for a particular release is over; they are called End Of Life (EOL) and all the updates and package repositories for that Release are transferred to a different server which results in 404 errors while running sudo apt-get update. You can confirm if your release has become EOL by going to this page. If your Ubuntu release is mentioned under "End Of Life (EOL)" Table, then the release is no longer supported and you should try to upgrade to a newer supported release. However, if you wish to continue using this unsupported release, you would have to make necessary modifications in /etc/apt/sources.list to point to the old-releases server of Ubuntu.
Steps to make necessary modifications
Open your Terminal:
- Press Ctrl + Alt + T; OR
- If you have Gnome:
Applications→Accessories→Terminal; OR - If you have Unity: press Super (the key between Left Ctrl and Left Alt) and query for
Terminal.
Run the following command to enter into root shell:
sudo -iinput your user password and press Enter. The prompt would change and would indicate that the root user is now logged in. Here run the following command:
gedit /etc/apt/sources.listThe file would open in a new Gedit window. Find the first line which doesn't start with
#. Suppose you are running Karmic Koala (Ubuntu 9.10): it should be like the following line:deb <siteurl> karmic main restrictedwhere,
<siteurl>is your preferred server - in your case (for example).Press Ctrl + H to replace your
<siteurl>with .- Search for: ie;
<siteurl> - Replace with: and
- Press Replace All
- Search for: ie;
Once again:
- Search for: (this exact url for all the Ubuntu Releases — whatever be the present server that you are using)
- Replace with:
- Press Replace All
Save your file and exit Gedit.
Run the following command to get out of root shell:
logoutYou would find that the prompt switches back to indicate that your normal user is now logged in. Then run the following:
sudo apt-get update
There you go. No 404 Errors this time. You can now install all the available packages for your Ubuntu Release. You can also run sudo apt-get dist-upgrade to install any Security/Bug-fix updates which have not yet been installed but you won't get any further Security/Bug-fix updates from Ubuntu.
The short answer is to add the next apt repository to the Third-Party Software (or Other Software in newer versions) in Software Sources (or Software & Updates in newer versions):
deb code_name main restricted universe multiverseThe long answer...
GUI Method
Well, actually we will do this without using any terminal. Not even once. Just GUI, I promise ;-)
First, open Software Sources (or Software & Updates in newer versions). It does not matter how old your Ubuntu is, there is certainly something like this. For Ubuntu 9.04 (Jaunty Jackalope), look at next image to see where it's located:
After Software Sources (or Software & Updates) is open, go in Ubuntu Software and Updates tabs and unselect everything like in next pictures. You don't need these things anymore since your Ubuntu version is End of Life:
Without closing Software Sources (or Software & Updates), go in Third-Party Software (for newest releases, this tab is named Other Software) tab and add a new apt repository. Insert exactly next line when you are asked:
deb jaunty main restricted universe multiverseIf your version of Ubuntu is not 9.04, replace in the above line jaunty with your Ubuntu codename (for example, if you have Ubuntu 9.10, replace it with karmic and so on):
Now, when you will close Software Sources (or Software & Updates), you will be asked to reload the information about available software. Just be sure that you have a working internet connection:
And now, you are free to download almost whatever you want. For 9.04, you can use Synaptic Package Manager. For newest releases, there is Ubuntu Software Center.
For example, to install VLC in Ubuntu 9.04 using Synaptic Package Manager, follow the instructions in the following pictures:
If you want to Update your Ubuntu to a new release, just go to System > Update Manager:
I tested this method from a live session of Ubuntu 9.04 (Jaunty Jackalope) and as you can see from these pictures it worked. If you are on an installed session of Ubuntu, you will be asked sometimes for root or admin password. Just insert your personal user password when you are asked.
8I got here since I could not upgrade a system from 15.10 (EOL) to 16.04. But none of the answers worked for me, even after doing everything that was suggested here I kept getting from sudo do-release-upgrade the annoying response:
Checking for a new Ubuntu release
No new release foundAnd I had no success in running update-manager; it kept throwing exceptions which I could not resolve. I suspect something is corrupted in my 15.10 installation, but the bottom line is that the built-in upgrades just fail.
So I looked for a non-built-in method, and sure enough I found it looking at What does `do-release-upgrade` really do?.
Here is the solution that worked for me:
Open
Locate the release you want to upgrade to. In my case it was Xenial Xerus (16.04 Long Term Support). You can find the corresponding codenames on Release - Ubuntu Wiki.
Locate the UpgradeTool URL. For
xenialit was . Download the tarball from that URL into an empty folder and and extract it.Locate the executable file with the same name as the distribution (in my case
xenial). Run it withsudo:sudo ./xenial &Approve the upgrade, and wait for the download to complete - there's thousands of files and likely over a Gigabyte. Proceed with installing the upgrade.
Wait until it completes, approve if asked. I don't recall the exact details
After the reboot the new version is running successfully, and all updates can be fetched normally.
To get apt-get working again, change your software sources to the old release repositories.
sudo nano /etc/apt/sources.listdelete whatever is in there, and paste the following:
# Required
deb karmic main restricted universe multiverse
deb karmic-updates main restricted universe multiverse
deb karmic-security main restricted universe multiverse
# Optional
#deb karmic-backports main restricted universe multiverseThat's all.
4While fossfreedom's answer does a good job of describing and solving the problem, I've found a variant solution that I think is easier and a little more elegant.
The trick is to add as a mirror, and then tell Software Sources to switch to that mirror.
To do this, backup and edit /usr/share/python-apt/templates/Ubuntu.mirrors. Choose a fake location for the old-releases server (e.g. #LOC:US), and add the following line under it:
#LOC:USNow open the system's Software Sources dialog, and manually select old-releases.ubuntu.com as though it were your regional mirror. You should find it listed under the fake location you chose in the previous step.
The next time you reload your package information via Synaptic or Update Manager, you should see it successfully retrieving updated package information.
1It appears the Karmic repositories are no longer available.
Since they are for a previous version of Ubuntu, you might consider removing them from your sources list. Take a look at this help page for step-by-step.
You can find the repositories under the "old-releases" server
And about how to edit the /etc/apt/sources.list
Upgrade a very old Ubuntu
If your Ubuntu (Kubuntu, Xubuntu, Mythbuntu, whatever-buntu) is really old, you will have to take three steps to upgrade to an up-to-date version:
- Hack the package updater (APT) to upgrade your system to the latest available in the old-releases repository (including the release upgrade manager).
- Hack the release upgrade manager to make it agree to upgrade to the next (officially unsupported) release.
- Do the actual release upgrade (and repeat).
Remember, you are only allowed to upgrade from one "normal" release to the next and from a Long Time Support (LTS) release to the next LTS release.
Update the system to the newest available in
Set the package sources to old-releases.ubuntu.com and update
sudo sed -i -re 's/([a-z]{2}\.)?archive.ubuntu.com| /etc/apt/sources.list
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt autoremoveConfigure the release upgrade manager with local data
Retrieve the meta-release files
wget -O - > meta-release
wget -O - > meta-release-ltsEdit meta-release to set all the next releases as supported
You must set Supported: 1 for each release.
Example: I was on Ubuntu 17.04 (Zesty Zapus) and set all the releases supported starting from artful.
Dist: artful
Name: Artful Aardvark
Version: 17.10
Date: Thu, 19 October 2017 17:10:00 UTC
Supported: 1
Description: This is the 17.10 release
Release-File:
ReleaseNotes:
UpgradeTool:
UpgradeToolSignature:
…Also, check that the URLs for UpgradeTool and UpgradeToolSignature start with (not ).
Edit /etc/update-manager/meta-release to point on local meta-release
Replace the original URIs with URIs pointing on your local meta-release files
[METARELEASE]
URI = file:///home/chris/meta-release
URI_LTS = file:///home/chris/meta-release-lts
URI_UNSTABLE_POSTFIX = -development
URI_PROPOSED_POSTFIX = -proposedUpgrade
sudo do-release-upgrade
sudo apt-get update && sudo apt-get dist-upgrade && sudo apt autoremoveReboot when asked to.
Redo it until your system is up to date.
When asked, answer that you want to keep your edited version of /etc/update-manager/meta-release excepted on the last upgrade.
When you are stuck to an old release
The process described above worked for me to upgrade to an unsupported release, and then to the last LTS release and I couldn't upgrade anymore.
What I did: Ubuntu 17.04 (Zesty Zapus) → Ubuntu 17.10 (Artful Aardvark) → Ubuntu 18.04 (Bionic Beaver)
Then I found the -p (--proposed) option of do-release-upgrade.
do-release-upgrade -pIt tries to upgrade to the newest available release! And it worked: I skipped two releases and jumped directly from Ubuntu 18.04 (Bionic Beaver) to Ubuntu 19.10 (Eoan Ermine)!
Maybe it would have worked to upgrade Ubuntu 17.04 (Zesty Zapus) to Ubuntu 19.10 (Eoan Ermine) in one run.
There is an edge case - apt-get claims 16.04 LTS does not exist - where the old package (Vivid, in my case) was not in on the "old-releases" server. But apt-get could only find kernel and Google updates.
I am not sure exactly what my problem was because I had blindly followed the accepted answers sed command (never a smart move).
This did not work because Vivid was not in the "old-releases" archive but was still on the gb.archive.ubuntu.com mirror.
In that specific case, the solution was as follows:
sudo -i
edit /etc/apt/sources.listCarefully go through all the sources and discover one of them was old and wrong and had failed to be properly updated (or something). Or, as I did, search replace from old-releases.ubuntu.com to gb.archive.ubuntu.com. It then upgraded, without a problem, to the next release while I caught up on some reading.
So either:
- There was a fault in my sources
- The
gb.archive.unbuntu.commirror has an older set of releases.
The takeaway here is that while the majority of answers here may apply in some cases it would pay to be sure that your /etc/apt/sources.list is correct before you nuke it for the "old-releases" archive.
You can figure out which of the archive or your mirror has the version you need by simply pointing a browser tab at the archive and question and looking for your version name in the folder list. Whichever one has your version, is the source you need to use.
18.10 to 19.10 Ubuntu upgrade
If you have EOL release and if you do not afraid of reinstalling your system from scratch or just without formatting this older system, than you could try it. It tried only of curiocity and for testing purposes. Not real hardware, but VM have been used for this. DO NOT USE IT ON PROD. But strangely if you have EOL on prod.
Trying to correctly answer the question I've installed Ubuntu 18.10 eol into VirtualBox VM.
I changed current
/etc/apt/sources.listto 18.04 Ubuntu's version:deb bionic main restricted deb bionic-updates main restricted deb bionic universe deb bionic-updates universe deb bionic multiverse deb bionic-updates multiverse deb bionic-backports main restricted universe multiverse deb bionic partner deb bionic-security main restricted deb bionic-security universe deb bionic-security multiverseChanged
/etc/lsb-releaseto:DISTRIB_ID=Ubuntu DISTRIB_RELEASE=18.04 DISTRIB_CODENAME=bionic DISTRIB_DESCRIPTION="Ubuntu 18.04 lts"sudo apt update && sudo apt upgrade && sudo do-release-upgrade
During upgrade it failed to restart different services and even rejected to reboot or shutdown correctly. I've powered the VM off and started it again.
It started without issues.
$ cat /etc/lsb-release && uname -a
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=19.10
DISTRIB_CODENAME=eoan
DISTRIB_DESCRIPTION="Ubuntu 19.10"
Linux ubuntu18 5.3.0-40-generic #32-Ubuntu SMP Fri Jan 31 20:24:34 UTC 2020 x86_64 x86_64 x86_64 GNU/LinuxTesting:
Applications are opened correctly. /etc/apt/sources.list have been generated with duplicates of eoan repositories, so I've removed excessive records and now it is:
deb eoan main restricted
deb eoan-updates main restricted
deb eoan universe
deb eoan-updates universe
deb eoan multiverse
deb eoan-updates multiverse
deb eoan-security main restricted
deb eoan-security universe
deb eoan-security multiverseInstalled scribus, snap, mariadb-server, docker, openssh-server using sudo apt install without issues.
Installed gimp using snap: snap install gimp --classic (Authentication prompt appeared and after password input installation started)
It looks like a usual stable 19.10 Ubuntu system upgraded correctly as my host is.
0In my case I was stuck in 19.04 for months because I didn't upgrades at time and I wasn't able to do the upgrade to 19.10 after that time. But the other day, Ubuntu automatically gives me the option to do a Partial Upgrade to 19.10 (maybe because I did a lot of stuff weeks ago, but sorry, I can't be sure the reason). So I did it and the result of lsb_release -a was Ubuntu 19.10. So I think I could be able to do another upgrade to 20.04.1, but isn't possible because 19.10 reached EOL.
The solution what I found today, 16 December 2020, to make an upgrade in Ubuntu 19.10 in EOL is to:
Edit
/etc/apt/sources.listCopy the following sources list () :
deb focal main restricted universe multiverse deb-src focal main restricted universe multiverse deb focal-updates main restricted universe multiverse deb-src focal-updates main restricted universe multiverse deb focal-security main restricted universe multiverse deb-src focal-security main restricted universe multiverse deb focal-backports main restricted universe multiverse deb-src focal-backports main restricted universe multiverse deb focal partner deb-src focal partnerPaste it to your
sources.listand disable with#the Eoan links.In a terminal:
update-manager. This will open the Software Updater window and check for updates and upgrades. Here is where I be able to make another Partial Upgrade, in this case, to 20.04.1LTS. Anotherlsb_release -ashows that I am in 20.04.1LTS.
I hope this will serve for someone, someday.
Merry Christmas to all.