Tales From The Geek Side

The geeky musings of Greg Rowe.

Placing Packages On Hold

June 5th, 2009 by greg

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

This entry was posted on Friday, June 5th, 2009 at 6:39 am and is filed under Misc. You can follow any responses to this entry through the RSS 2.0 feed. You can skip to the end and leave a response. Pinging is currently not allowed.

Leave a Reply