I have a VPS (Linode) currently running Debian Jessie 8.10 for my personal website. Every few years I need to upgrade the Linux major version. Since a new major version usually means my many package config modifications are overwritten, become incompatible and/or need to be merged with the updated config files, this has always been a somewhat painful exercise.

How can I upgrade with the less hassle and downtime due to broken config files?

For the sake of argument, let's pretend I know which config files I've modified.

  • 2
    You obviously do some testing first. Be very wary about upgrading from 8 to 9, it can break PHP scripts and MySQL badly. Apr 27, 2018 at 22:09
  • I'd imagine it's possible but I don't know how you might get a config diff. Personally, I install etckeeper with all fresh OS installations. It's a great way to keep track of configuration changes. One of these days, I'll get around to learning how to use Ansible or some other configuration manager. Apr 28, 2018 at 16:50
  • @RuiFRibeiro have edited question to make it less broad, can it be re-opened?
    – dbdemon
    Apr 30, 2018 at 9:57
  • @dbdemon I am afraid it is still too broad. The upgrade from Debian 8 to Debian 9 is traumatic even for experienced users. I would center on specific questions and packages. Unfortunately, there are not silver bullets. I do not feel compelled to vote to reopen this as it is, someone might have a different opinion. Apr 30, 2018 at 18:20

1 Answer 1


I take major version upgrades as an opportunity to rebuild and reconfigure, test my backup and restore process, etc. on my Linodes. Sure, it costs me an extra $5 if I take my sweet time about doing it (or $1 if I hurry... not worth it).

As far as finding your changed configs, the editor I use (joe) is set to make a backup file of any file edited wiht the same name ending in a tilde (~). So find /etc -iname *~ works for me ...

That said, take backups of EVERYTHING, perhaps even a snapshot. Read the Debian docs on doing an upgrade. Check changes in core things that can break other stuff - as Rui F Ribeiro's comment says, the PHP change will break things and possibly the mysql->mariadb transition too. Check your various web apps, services, etc. to see if they will be affected by any of these changes (ie, in PHP the mysql_* function family is gone - change to using the mysqli_ family or PDO).

Finally, once you are ready, proceed with the upgrade. It will hopefully be as painless as changing the sources.list and doing an apt-get update && apt-get dist-upgrade.

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