I am using Ubuntu12.04 and I installed lots of pkg.

I want to update only one specific pkg.

I tried using

 $apt-get update pkgname
 E: The update command takes no arguments

so then I tried

$apt-get update

all pkg updated successfully.

Is there any another command to update only one specific pkg?

  • 4
    try apt-get install pkgname. Sep 11, 2012 at 12:57

3 Answers 3


apt-get update does not update a package, it updates the package database. And like user1146332 said using install the package automatically updates it too as it fetches the lates version of it.

PS: You have to do an update first to assure you know what the latest versions of the packages actually are.

  • It only fetches the latest version from the configured repositories and only if not told otherwise via pinning.
    – scai
    Sep 11, 2012 at 13:30
  • I doubt it's the case here, I guess it's the default apt.conf
    – nikitautiu
    Sep 11, 2012 at 13:42

vitiv said it correct, either you

apt-get install package name

to update it to newest version, or you could try

apt-get upgrade package name

to get the newest version of concerned package

  • Next time use shift and punctuation.
    – peterh
    Mar 7, 2015 at 11:21

As others have mentioned:

apt-get update     # Updates your package lists.

apt-get upgrade    # Upgrades all your packages

apt-get upgrade YOURPACKAGE    # Upgrades only your package (plus dependencies)

The advantage of upgrade is that it won't mark your package as manually installed. Thus if you upgrade a package that is only installed automatically as a dependency, it will become autoremovable with

apt-get autoremove

if you deinstall its dependent later on.

You must log in to answer this question.

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