On 2020-06-06 at 06:29, Brian wrote: > On Fri 05 Jun 2020 at 12:01:32 -0400, The Wanderer wrote: > > [...] > >> Nowadays, my regular upgrade-against-testing routine - carried out >> at least weekly, if not daily - consists of the following (with >> adjustments to account for undesired installations, removals, bugs >> as reported by apt-listbugs, et cetera): >> >> $ apt-get update >> $ apt-get dist-upgrade >> $ apt-get autoremove >> $ apt-get remove $(deborphan) >> >> And if the deborphan step finds anything, I go back to the autoremove >> step, and repeat until neither of them has found anything. >> >> When I first started with deborphan, it took me somewhere between >> three and six repetitions of that pair of commands before I got to >> that point. Now, I can't even remember the last time deborphan >> found anything, because the system is already clean in this regard >> - but I still keep it up, just to make sure that doesn't change. > > An aside regarding deborphan: it finds packages that haven't any > packages depending on them. This may lead to the removal of a useful > package. For example, libsane-hpaio (installed without recommended > packages).
As I have now discovered in response to your raising that: deborphan also supports two ways of listing packages which should be kept: the '-e' / '-exclude=' option (see the man page), and /var/lib/deborphan/keep. The former accepts a comma-separated list of package names, passed at launch time. The latter is a file with a newline-separated list of package names. If you list all explicitly-installed packages that you want to keep in the keepfile, then it might even be useful to run deborphan with '-a' / '--all-packages', which removes the "check only libs, et cetera" section restrictions. I may have to explore that, myself. -- The Wanderer The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man. -- George Bernard Shaw
signature.asc
Description: OpenPGP digital signature