0

When I want to update packages it shows this error:

gopi@Gopi-PC:~$ sudo apt-get install update
[sudo] password for gopi: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package update
Braiam
  • 67,791
  • 32
  • 179
  • 269
RAMXKP
  • 29
  • 1
  • 1
  • 5
  • 2
    because your command is wrong.. If you want to upgrade your system.. Run this command sudo apt-get update and sudo apt-get upgrade – Saurav Kumar Sep 08 '13 at 15:59
  • 2
  • @Alaa I just can't understand how this question is duplicate of "How can I install the package iftop?". – Radu Rădeanu Mar 16 '14 at 06:30
  • @RaduRădeanu Look at the history of that iftop question. The user was asking the same exact thing at first: he couldn't run "sudo apt-get install update". So I answered that question, which is almost identical to your answer below. When I saw this question here, I marked it as an exact duplicate. But then that iftop question evolved and his problem was that he couldn't install iftop. I edited my answer there to include that information for him, but I didn't remove the original answer because I had marked this as a duplicate to it. – Alaa Ali Mar 16 '14 at 13:29
  • Why are you guys reopening this question? The answer to the question marked is almost the same exact answer as the one by Radu. My answer even includes sudo apt-get install <package_name>. The title of a question doesn't matter. If the answer to two questions is the same, regardless of the question, they should be marked as duplicate. – Alaa Ali Mar 16 '14 at 13:32
  • @Alaa please read the XY problem. I had to edit the question since the main question of OP was "How to install the iftop package" the install update issue is irrelevant for OP since it's just a mere confusion. – Braiam Mar 16 '14 at 13:58

1 Answers1

5

When you use sudo apt-get install update, the system will try to install a package called update which doesn't exists and because of this you get that error.

The correct command to resynchronize the package index files from their sources is:

sudo apt-get update

or:

sudo aptitude update

Now, if you want to install the newest versions of all packages currently installed on the system from the sources, use upgrade instead update.

See also man apt-get and man aptitude.

Radu Rădeanu
  • 169,590