Ubuntu – How to upgrade a single package using apt-get

aptupgrade

How do I update a single package? As far as man apt-get says apt-get upgrade doesn't take a package/list of packages as parameter:

upgrade

upgrade is used to install the newest versions of all packages
currently installed on the system from the sources enumerated in
/etc/apt/sources.list. Packages currently installed with new
versions available are retrieved and upgraded; under no circumstances
are currently installed packages removed, or packages not already
installed retrieved and installed. New versions of currently installed
packages that cannot be upgraded without changing the install status
of another package will be left at their current version. An update
must be performed first so that apt-get knows that new versions of
packages are available.

Best Answer

You just need to do apt-get install --only-upgrade <packagename>. This will upgrade only that single package, and only if it is installed.

If you wish to install the package if it doesn't exist, or upgrade it if it does, you may leave out --only-upgrade.

Related Question