Placing Packages On Hold

Sometimes you need to update packages on a Debian based system but you don’t want to updated all of them. For example there are security updates available right now for a system I manage. One of those updates is the linux kernel. I’m not ready to upgrade the kernel because it is a remote machine that many people depend on. To do a kernel upgrade I need to schedule downtime and prepare for the case when the system doesn’t reboot after the upgrade.

With Debian based systems you can handle this by placing packages on hold. Packages that are on hold are not updated. If you use aptitude this is as easy as:

# aptitude hold

If you use apt-get you can accomplish the same thing with:

# echo hold | dpkg –set-selections

When you are ready to update the package you can take it off of hold with (for aptitude):

# aptitude unhold

And for apt-get/dpkg it is accomplished by:

# echo install | dpkg –set-selections


References:
Debian Admin

Advertisements
This entry was posted in Misc. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s