Ubuntu improve or replace a single package deal utilizing apt-get
I am a brand new Ubuntu Linux server system administrator. I have to improve or replace a single package deal utilizing apt-get command or apt command. How do I replace a particular package deal in Ubuntu Linux? How do I improve a single package deal utilizing apt-get?
Introduction: By default whenever you run both ‘apt-get improve’ or ‘apt improve’, Ubuntu will replace all put in packages. Nevertheless, in some instances, you might wish to improve a particular package deal solely akin to Apache or Nginx. It is usually attainable to blacklist upgrading packages on Ubuntu Linux. As an Ubuntu Linux system administrator, you could have full management over package deal administration.
Easy methods to Ubuntu improve or replace a single package deal
The process to replace a a particular package deal on Ubuntu:
Open the Terminal applicationFetch package deal index by operating sudo apt replace commandNow solely replace apache2 package deal by operating sudo apt set up apache2 command.If apache2 package deal already put in it is going to attempt to replace to the newest model. If you don’t want to put in new packages; when used at the side of set up, only-upgrade will set up upgrades for already put in packages solely and ignore requests to put in new packages. Strive sudo apt –only-upgrade set up apache2
Allow us to see command in particulars.
Easy methods to improve a single package deal utilizing apt-get?
As typical you should fetch an up to date index from the Web:
$ sudo apt-get replace
It’s essential to use following format with the apt-get command:
$ sudo apt-get –only-upgrade set up Package deal
$ sudo apt-get set up Package deal
Allow us to attempt to improve nginx internet server:
$ sudo apt-get set up nginx
If nginx package deal is already put in it is going to attempt to replace to newest model:
Studying package deal lists… Finished
Constructing dependency tree
Studying state info… Finished
nginx is already the latest model (1.10.Three-0ubuntu0.16.04.2).
zero upgraded, zero newly put in, zero to take away and zero not upgraded.
Nevertheless, the next is not going to set up a brand new nginx package deal if not put in:
$ sudo apt-get –only-upgrade set up nginx
On this following instance, htop is put in and I’m requesting replace. Nevertheless, atop not put in and I’m nonetheless requesting an replace for it:
$ sudo apt-get set up htop
$ sudo apt-get –only-upgrade set up atop
You realized methods to replace a particular package deal on Ubuntu Linux. Please word that you should cross the –only-upgrade to the apt command whenever you solely need that single package deal improve supplied that it’s put in. See apt man web page right here for more information.