Weird command structure to update a package
Bijan Soleymani
bijan at psq.com
Thu Feb 3 18:15:54 UTC 2022
On Thu, February 3, 2022 1:06 pm, Jerry Geis wrote:
> Coming from CentOS world it was straight forward to update a package.
> yum update Package
> for example....
>
> Unless I have found bad information this is the seemingly not
> straightforward manor to update a package on Ubuntu...
>
> $ sudo apt-get update
> $ sudo apt-get --only-upgrade install Package
> $ sudo apt-get install Package
>
You don't need the second and third commands.
You can just do:
apt-get update
apt-get install package
The second one (--only-upgrade) is if you only want to update that package
and not install any new packages that are required by the new version.
Running that and the last one together is redundant.
(you can also run 1 and 2, and not 3 if you don't want to install new
packages)
Bijan
More information about the ubuntu-users
mailing list