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
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 http://old-releases.ubuntu.com.
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 changearchive.ubuntu.com
andsecurity.ubuntu.com
toold-releases.ubuntu.com
.You can do this with
sed
:then update with:
Sometimes, 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
:See also EOLUpgrades - Community Help Wiki.
What are 404 errors
Why are we facing 404 errors
Ubuntu follows the approach of two different release cycles:
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 theold-releases
server of Ubuntu.Steps to make necessary modifications
Open your Terminal:
Applications
→Accessories
→Terminal
; ORTerminal
.Run the following command to enter into root shell:
input 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:
The 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:where,
<siteurl>
is your preferred server -http://gb.archive.ubuntu.com/ubuntu
in your case (for example).Press Ctrl + H to replace your
<siteurl>
withhttp://old-releases.ubuntu.com/ubuntu
.http://gb.archive.ubuntu.com/ubuntu
ie;<siteurl>
http://old-releases.ubuntu.com/ubuntu
andOnce again:
http://security.ubuntu.com/ubuntu
(this exact url for all the Ubuntu Releases — whatever be the present server that you are using)http://old-releases.ubuntu.com/ubuntu
Save your file and exit Gedit.
Run the following command to get out of root shell:
You would find that the prompt switches back to indicate that your normal user is now logged in. Then run the following:
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):
The 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:
If 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 withkarmic
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.
I 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:And 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 http://changelogs.ubuntu.com/meta-release
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
xenial
it was http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/dist-upgrader-all/current/xenial.tar.gz. 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
: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.delete whatever is in there, and paste the following:
That's all.
While 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
http://old-releases.ubuntu.com/ubuntu/
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:Now 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.
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:
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 http://old-releases.ubuntu.com
Set the package sources to old-releases.ubuntu.com and update
Here you can try a release upgrade if your current release is not too old (
sudo do-release-upgrade
). If it fails, you may find some clues in/var/log/dist-upgrade/main.log
which could help to find a fix.If your release is too old, go to next step.
Configure the release upgrade manager with local data
Retrieve the meta-release files
Edit 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.
Also, check that the URLs for
UpgradeTool
andUpgradeToolSignature
start withhttp://old-releases.ubuntu.com
(nothttp://archive.ubuntu.com
).Edit
/etc/update-manager/meta-release
to point on local meta-releaseReplace the original URIs with URIs pointing on your local meta-release files
Upgrade
Reboot 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 ofdo-release-upgrade
.It 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.
It 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 http://old-releases.ubuntu.com/ubuntu/dists/
And about how to edit the
/etc/apt/sources.list
https://help.ubuntu.com/community/EOLUpgradesThere 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:
Carefully 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
togb.archive.ubuntu.com
. It then upgraded, without a problem, to the next release while I caught up on some reading.So either:
gb.archive.unbuntu.com
mirror 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.