How to disable automatic upgrades on Ubuntu server?

One of the common arguments against using open source software in production is that it’s always changing, and you never know when an upgrade will break some feature or dependency. Despite the fact that Ubuntu people are trying to keep the stuff as stable as possible, this argument unfortunately holds.

That’s exactly why I decided to never run apt-get update followed by apt-get upgrade on this particular ubuntu server machine. It serves an intranet, and it’s hardly ever expected to be compromised by a security issue, either.

Unfortunately, this was not enough, and of course I’ve learned it when my Redmine started crashing with Internal Server Error 500. I just wanted a system that works. Not a system that I must continuously work on in order to keep it up and running. A quick research proved that a Ruby-related upgrade happened, and the only at the moment available workaround of restarting apache until Redmine works again was not good enough.

So, if you are happy with the fresh Ubuntu Server setup, please make sure that you do the following:

sudo apt-get remove --purge unattended-upgrades

Luckily enough, I’ve had a snapshot of this machine in a healthy state, so all I’ve had to do is backup Redmine DB, revert to the snapshot, disable automatic upgrades and restore the DB.



This entry was posted in Free Software, Infrastructure and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *