Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I want to have automatic upgrades enabled, but not have my machines automatically reboot. I'd rather install those packages as part of a maintenance regiment that would also reboot the machines.

Right now we run automatic upgrades, but the machines keep reporting a need to be rebooted.

Any guide would be appreciated.

share|improve this question

2 Answers 2

The problem with pinning packages to prevent them from upgrading is that to upgrade them you need to unpin them again.

The file /var/run/reboot-required.pkgs contains a list of packages that trigger the request for a reboot after unattended-upgrade has run.

Inside the configuration file for unattended-upgrades in /etc/apt/apt.conf.d/50unattended-upgrades there is a section dedicated to preventing some packages from being upgraded automatically that looks like this

Unattended-Upgrade::Package-Blacklist{
    foo_package1;
    foo_package2;
    foo_package3;
}

Edit the list to prevent those packages from being upgraded automatically.

I would start by blacklisting the usual suspects: kernel, libc, gcc, etc and every time you see the computer is asking for a reboot check /var/run/reboot-required.pkgs and add those packages to the unattended upgrades blacklist.

share|improve this answer

I've only seen this happen when I update the kernel. If you can identify which packages cause a need to reboot, you can put these packages on hold. This will prevent them from being updated automatically or by a regular update command.

There is information about holding packages in the Ubuntu Documentation. Look at this page: https://help.ubuntu.com/community/PinningHowto#Introduction_to_Holding_Packages

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.