0

I was looking for a command line to update/upgrade my VPS with the exception of the web server software. I have Nginx v.1.4.7 on my VPS and don't want it to get updated/upgraded when I run any update/upgrade command line.

I found this question apt-get update/upgrade list without changing anything talking about similar issue except that I want to update everything, but only Nginx.

is it possible to do that? or I have to run an update/upgrade for each single package on my VPS?

Digital site
  • 190
  • 1
  • 10

2 Answers2

2

You simply have to hold the desired packages, using your prefered package manager, for example:

Using apt

to hold:

sudo apt-mark hold package_name

to remove the holding:

sudo apt-mark unhold package_name

Using aptitude

to hold:

sudo aptitude hold package_name

to remove the holding:

sudo aptitude unhold package_name
mvillar
  • 392
  • 2
  • 14
1

There is also apt pinning, which is useful for configuration management. Consider this example that pins the version of CFEngine in /etc/apt/preferences.d/cfengine.

Package: cfengine-community
Pin-Priority: 1001
Pin: version 3.6.0-1

https://help.ubuntu.com/community/PinningHowto

Neil H Watson
  • 448
  • 1
  • 5
  • 18