Thursday, May 2, 2019

How to upgrade a single package using apt-get?



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.





You just need to do apt-get install --only-upgrade . 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.


No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...