On Wed 29 May 2024 at 18:20:25 (+0200), Thomas Schmitt wrote:
> i wonder why none of the electricians on this list has an anecdote to
> share about dealing with "obsolete" packages after upgrade.
> No triumphs, defeats, or global catastrophes ?

Nowadays I install new releases from scratch, helped by the fact that
for years I've always had two systems on each machine, the current and
the previous. (/home is shared.) That tends to limit cruft as well.

> I wrote:
> > > https://www.debian.org/releases/stable/amd64/release-notes/ch-upgrading.en.h
> tml#purge-removed-packages
> > > What does "[residual-config]" mean ?

It is odd that the terminology used in the output differs from that
used to provoke it, as in:

  $ apt list '?config-files'
  Listing... Done
  mlocate/oldstable,now 0.26-5 amd64 [residual-config]
  $ 

Both man apt-patterns and aptitude's Search Term Reference ought to
include the bracketed items if there's no intention to unify terms.
Perhaps it's related to the tendency to underdocument the output from
programs.

> The predicate "obsolete" is not the same as "automatically installed".
> I understand that obsolete means having no successor package in the
> upgraded Debian release.

"Obsolete" is an unfortunately loaded word. I think aptitude expresses
it a bit more clearly: "This term matches any installed package which
is not available in any version from any archive. These packages
appear as “Obsolete or Locally Installed” in the visual interface."

  $ apt list '?installed ?obsolete'
  Listing... Done
  xtoolwait/now 1.3-6.2 amd64 [installed,local]
  yt-dlp/now 2024.05.26-1 all [installed,local]
  $ 

The first is from squeeze, the second from trixie (hardly "obsolete"),
both installed with apt-get fullpath (previously I'd have used dpkg -i).

> Is there a way to do a dry run which only tells what would happen if i
> were more courageous ?

Both apt* and dpkg have --no-act --dry-run --simulate to prevent
acting. (apt* has additional synonyms -s --just-print --recon.)
With dpkg, it's safest to place the option first, as it only
protects what follows it in the command line.

Typically you can also not be root to help protect yourself,
as in:

  $ apt-get -s remove libc6 
  NOTE: This is only a simulation!
        apt-get needs root privileges for real execution.
        Keep also in mind that locking is deactivated,
        so don't depend on the relevance to the real current situation!
  Reading package lists...
  Building dependency tree...
  Reading state information...
  The following packages were automatically installed and are no longer 
required:
  [ … ]
  Use 'apt autoremove' to remove them.
  The following packages will be REMOVED:
  [ … ]
  WARNING: The following essential packages will be removed.
  This should NOT be done unless you know exactly what you are doing!
  [ … ]
  0 upgraded, 0 newly installed, 1702 to remove and 0 not upgraded.
  [ … ]

Cheers,
David.

Reply via email to