Enabling and disabling unattended upgrades on Debian and Ubuntu

Josh Sherman
1 min read
Command-line Interface Debian / Ubuntu

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 -9ed 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.

Join the Conversation

Good stuff? Want more?

Weekly emails about technology, development, and sometimes sauerkraut.

100% Fresh, Grade A Content, Never Spam.

About Josh

Husband. Father. Pug dad. Musician. Founder of Holiday API, Engineering Manager and Emoji Specialist at Mailshake, and author of the best damn Lorem Ipsum Library for PHP.

Currently Reading

Parasie Eve

Previous Reads

Buy Me a Coffee Become a Sponsor

Related Articles