Last Updated: February 25, 2016
·
692
· destructuring

Put a package on hold when upgrading

When creating vagrant guests in VirtualBox, I use a minimally configured guest updated to the latest packages, kernel, and VirtualBox guest additions.

I'll import that guest and apply the application stack configurations, update all packages. The problem with updating all the packages is if the kernel has changed, the VirtualBox guest additions break. I could compile them again but haven't gotten the hang of orchestrating reboots or compiling the additions for a new kernel without rebooting into it first.

My workaround is to put the kernel packages on hold so they won't ugrade during an "aptitude safe-ugrade".

aptitude hold linux-server linux-headers-server