3 ms·
I was managing many systems from 2012 to 2019, upgrading from Debian 6 to 10 in the process, and it was always smooth (I was hitting some bugs, but I would hit
by Jenda_ 5y ago
I was managing many systems from 2012 to 2019, upgrading from Debian 6 to 10 in the process, and it was always smooth (I was hitting some bugs, but I would hit these with a clean install too).
I have written an article on this, unfortunately in Czech, but you can try Google Translate: https://www-abclinuxu-cz.translate.goog/blog/jenda/2020/12/28/462560?_x_tr_sl=auto&_x_tr_tl=en&_x_tr_hl=cs&_x_tr_pto=nui https://www-abclinuxu-cz.translate.goog/blog/jenda/2020/12/2...
TL;DR:
- perform apt-get dist-upgrade, apt-get autoremove, apt-get clean
- migrate postgresql database to a new version, if installed
- run `aptitude search "?narrow(?installed,?not(?archive(stable)))"` to find leftover packages from older releases. Install alternatives and remove these old packages.
- once in a while, run
for p in `dpkg -l | grep ^ii | cut -d " " -f 3 | grep -E "^lib"`; do
echo "if [ \`apt-get -s purge $p | grep -E \"^(Purg|Inst|Conf)\" | wc -l\` -eq 1 ]; then echo $p; fi"
done | parallel
to find libraries that nothing depends on
- when taking over a system from a previous sysadmin, run debsums -c and maybe also a complete audit of all files that are not managed by a package manager (though this has lots of false-positives, so it needs an expert judgement)
# locate * | grep -vE "^/(home|tmp|mnt|boot|opt|root|srv|usr/local|var/cache|var/lib|var/log|var/tmp|var/mail|var/www)/" | sort -u > /tmp/allfiles
# sort -u /var/lib/dpkg/info/*.list > /tmp/allfiles2
# comm -23 /tmp/allfiles /tmp/allfiles2 |less