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.
install is followed **by one** or more packages desired for installation or upgrading
, If you have a better answer, you can answer the question.It would be great. – Binarylife Aug 04 '11 at 11:56apt-get install --only-upgrade <packagename>
will not install any new packages – taneli Oct 15 '12 at 11:29install
command upgrade also the dependencies of that single package if necessary? – Pino May 31 '13 at 08:18install
is the right command for this, even if it seems counter-intuitive. – Matt Dodge Aug 22 '13 at 19:57apt install --only-upgrade install <package>
– Nasik Shafeek Sep 07 '16 at 03:09--only-upgrade
is useless here.install
solely will upgrade the package – Anwar Nov 01 '16 at 07:03apt 1.0.1
), upgrading a package usingapt install
does not affect theauto
mark, whether--only-upgrade
is supplied or not. Though of course using--only-upgrade
makes sense if you don't want to accidentally install something new. It will also upgrade any required dependencies. – dualed Aug 23 '18 at 13:01--only-upgrade
flag ensures the package isn't set to manually installed (Ubuntu 20.04) – Fadi Feb 05 '22 at 17:12