I have almost an hour trying to update my installation, this is how I'm trying to do it:

$ sudo apt-get install update
[sudo] password for braiam: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package update

It just doesn't work! Isn't install update the text I should put after sudo apt-get to install updates on my Ubuntu system? If not, what command should I write?

This question is trying to address some common mistakes by users not used to the APT system and apt-get.


1 Answer 1


APT tool apt-get has simple commands that you need to know before hand what they do, and in what circumstances use it.

If what you want is update your packages list, the correct command is:

sudo apt-get update

just that! You don't need to write anything else before nor after. Is just sudo + apt-get + update. Done.

To install packages or programs in your system, you first need to know the package name. If you don't know the package name is recommended you use a GUI (like Ubuntu Software Center or packagekit), search and install your program using it. If you know the package name then you only have to:

sudo apt-get install package_name

Replace package_name your package name. You can install several packages at once, just write them with an space between them. If you are still getting:

E: Unable to locate package package_name

Then try updating your list or reviewing the instructions you are following, maybe is just a typographic mistake. If name of that package is unknown for apt-get that is the error you will get.

For upgrading the packages that you already have installed, aka update all your system, you need to do:

sudo apt-get upgrade

Nothing else. It will upgrade all the packages that you have installed in your system.

  • 3
    Try apt-cache search <packagename>,it will search for the related packages to the name given. Jan 19, 2014 at 2:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .