Hacker News new | past | comments | ask | show | jobs | submit login

This is Debian. Starting with 1.3, it has been possible and generally recommended to upgrade in place.

1. Read the install notes. Read the upgrade notes.

2. Note the things that the upgrade notes say will change and need human input.

3. Backup if, for some strange reason, you don't make backups automatically.

4. Change the sources.list and, if there are any, sources.list.d configs to point to the new stable release name.

5. If you set APT::Default-Release, set it to the new stable release name.

6. Update the package list: apt update

7. Upgrade the system: apt dist-upgrade

8. Reboot.

9. Fix items from the policy config list you made in step 2.

10. Check on anything left: apt upgrade

That should be it.




By default the upgrade can ask a lot of questions, but you can kinda skip it by just telling it to keep old config files then merge them with the new ones at the end:

    export DEBIAN_FRONTEND=noninteractive

    apt-get update
    apt-get  -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' dist-upgrade
upgrade done. All of configs you changed are not touched and the new version is in <name>. dpkg-dist file

    find /etc -name '*.dpkg-dist
to show "a config that package would use if you didn't change it". diff it with your config and add any required changes. Done.

> 10. Check on anything left: apt upgrade

11. apt autoremove


If you are more happy-go-lucky, you can just do 4, 6-8 and 10, like I did for years (closer to a decade, actually, I think 1997 til 2006, when I switched mostly to Ubuntu).

However, I've always installed apt-listchanges and configured it to prompt me before installing anything, which (mostly?) removes need for 1 and 2, a bit like backing up removes need for 3.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: