Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Recently I have installed an older version of Ubuntu on my old machine. When ever I am trying to install any software it is giving error

sudo -i apt-get install vlc

The error being flagged is under below.

Reading package lists... Done               
Building dependency tree       
Reading state information... Done    
E: Couldn't find package vlc
share|improve this question
up vote 317 down vote accepted

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 to

You can do this with sed

sudo sed -i -re 's/([a-z]{2}\.)?|' /etc/apt/sources.list

then update with

sudo apt-get update && sudo apt-get dist-upgrade

Sometimes, it might be faster to create backups of your system and reinstall using supported release instead.


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 update-manager-core
sudo do-release-upgrade

See also:

share|improve this answer
sed usage is just pro. – Bruno Pereira Jan 15 '13 at 10:10
Worth noting, I had to use in my sed command. Hope this saves someone else the head-scratching – Matthew Boynes Mar 6 '13 at 23:30
and, just for the sake of completeness... what about extras repository (for Skype etc)? Are they available anywhere after EOF? – MestreLion Apr 27 '13 at 1:00
An even easier way is sudo nano /etc/apt/sources.list, as vi* is just annoying... – Wilf Mar 1 '14 at 18:35
Like what @MatthewBoynes said you may have to add your country short name to the beginning of the search string. I live in canada so I had to add ca. to the url like so – JoeMoe1984 Aug 17 '14 at 16:36

What 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

  1. Open your Terminal:

    • Press Ctrl + Alt + T; OR
    • If you have Gnome: ApplicationsAccessoriesTerminal; OR
    • If you have Unity: press Super (the key between Left Ctrl and Left Alt) and query for Terminal.
  2. Run the following command to enter into root shell:

    sudo -i

    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:

    gedit /etc/apt/sources.list
  3. 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:

    deb <siteurl> karmic main restricted

    where, <siteurl> is your preferred server - in your case (for example).

  4. Press Ctrl + H to replace your <siteurl> with

    • Search for: ie; <siteurl>
    • Replace with: and
    • Press Replace All
  5. 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
  6. Save your file and exit Gedit.

  7. 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:

    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.

share|improve this answer
+1 for also including instructions to update the security repo. – Gaffi Mar 16 '13 at 16:07
Actually the first line without a # was raring main restricted, no deb whatsoever. I changed it as specified, and then also replaced the urls, but still got 404s. – Yokhen Oct 23 '14 at 23:11
@Yokhen If the line didn't begin with deb <siteurl>, then most likely your /etc/apt/sources.list file has become corrupted due to some reason. Please follow the answers given at: How do I restore the default repositories?. That would restore the correct /etc/apt/sources.list for you and then follow my answer to change the servers to point to the old-releases server. – Aditya Oct 24 '14 at 8:15
thanks! Somehow I managed to upgrade from 13.04 to 13.10 though, and now I'm on my way to 14.04. – Yokhen Oct 24 '14 at 8:56
@Dan, modified the answer, now we enter into root shell and then run the graphical program. No need to use gksudo anymore. I want to keep this answer for the novice users like me and don't want to complicate matters with using terminal based editors, however easy or powerful they may be. – Aditya Jul 17 at 13:56
up vote 37 down vote

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 multiverse

The long answer...

GUI Method

Well, actually we will do this without to use 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 is your Ubuntu, there is certainly something like this. For Ubuntu 9.04 (Jaunty Jackalope) look at next image to see where is located:

Open Software Sources

After Software Sources (or Software & Updates) it is open, go in Ubuntu Software and Updates tabs and unselect everytiyng like in next pictures. You don't need this things anymore since your Ubuntu version is End of Life:

Ubuntu Software tab

enter image description here

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 multiverse

If your version of Ubuntu is other than 9.04, replace in the above line jaunty with your Ubuntu codename (for example if you have Ubuntu 9.10, replace with karmic and so on):

Third-Party Software tab

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:

Reload available software

Downloading available software

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:

Open Synaptic Package Manager

Search VLC in SPM

Mark VLC

Mark aditional VLC

Apply VLC

Download VLC

Open VLC

If you want to Update your Ubuntu to a new release, just go to System > Update Manager:

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.

share|improve this answer
I just did all this from installed 10.10 (maverick) version. Everything well good as described. @Radu, your answer is flawless! – Gediminas Jeremiah Gudelis Aug 28 '13 at 20:01
Those images needs updating... wait... what are you doing with a pre-12.04? – Braiam Dec 30 '13 at 14:01
@Braiam Those images are up to date. If you will give a try to Ubuntu 9.04 (Jaunty Jackalope), you will understand. – Radu Rădeanu Mar 22 '14 at 19:49
@RaduRădeanu Ubuntu 9.04 was my first foray into the linux world. Ahh, those screenshots bring back memories! – Tyzoid Apr 13 '14 at 22:03

To get apt-get working again, change your software sources to the old release repositories.

gksudo gedit /etc/apt/sources.list

delete 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 multiverse

That's all.

share|improve this answer
Thanks mikewhatever, but the result is the same when I try "apt-get install lm-sensors". Maybe there's another missing source: "Reading package lists... Done Building dependency tree Reading state information... Done Package lm-sensors is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package lm-sensors has no installation candidate" – Rorro Apr 13 '12 at 10:55
Here are the debs: I trust it, you've reloaded the sources list, right? – mikewhatever Apr 13 '12 at 12:08
This answer does not work... Why does it have so many upvotes? Did anybody actually test it? – Tomáš Zato Aug 15 '14 at 11:00
I've tested it, but the real question is: Why are you still on Karmic? It's been out of support for years, and you should really move on to a more recent release. – mikewhatever Aug 15 '14 at 12:13

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 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 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.

share|improve this answer
Works fine, very easy & quick – doug Jul 22 '14 at 1:42

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.

share|improve this answer

You can find the repositories under the "old-releases" server

And about how to edit the /etc/apt/sources.list

share|improve this answer
Thanks gajdipajti, I'm looking for it inside the package list, but cannot find the correct ".deb". My ubuntu already has "libsensors3", but all the packages ask me for the "libsensors4". I know the normal solution should be upgrade, but I cannot do it because the computer is dedicated to be used with a software that only runs on 9.10. – Rorro Apr 13 '12 at 10:34
@Rorro: Which software only runs on Ubuntu 9.10? – unforgettableid Oct 9 '13 at 1:45

protected by Community Aug 28 '14 at 9:43

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.