The unattended-upgrades
package on Debian is absolutely fantastic. It takes
cares of the stable packages that can be installed safely automatically, leaving
you with fewer manual upgrades that you have to deal with yourself.
Sadly though, I ran into an issue recently where the unattended-upgrades
script was running in the background and eating up a ton of CPU every morning
when I sat down at my computer.
This happened multiple times in a single week, each time of which I would let it
run it’s course. This ended up taking a few hours each time, which isn’t great
when I need to be doing other stuff that needs CPU time too.
Because I was in a bit of a time crunch the last time it was happening, I went
ahead and just kill -9
ed the script. Actually I did that multiple times, as I
either picked the wrong process ID, or it perhaps started back up again
immediately.
Not wanting to have it spin back up, I decided to disable the service, but left
it installed so I can revisit at a later date.
Disabling and enabling the unattended-upgrade
package on Debian, as well as
Ubuntu, is quite simple. To do so, you will need to reconfigure the package and
tell it if you’d like to enable or disable things:
% sudo dpkg-reconfigure unattended-upgrades
Automatically download and install stable updates? [yes/no]
Keep in mind, if the system you’re on supports ncurses
text-based user
interfaces, you will receive that, with a bit more contextual information.