#1126945 command-not-found: reads obsolete package lists from /var/lib/apt/lists

#1126945#5
Date:
2026-02-04 11:59:37 UTC
From:
To:
Dear Maintainer,

If obsolete package lists are present in /var/lib/apt/lists, as
happens after upgrading from one release to the next,
command-not-found still considers packages present in those lists as
candidates.

Thus on a system running Debian 13 after an upgrade from Debian 12,

command-not-found neofetch

points to the neofetch package even though it’s not available from any
configured repository (as confirmed by apt policy).

Removing the obsolete lists fixes the issue, but it would be better if
command-not-found ignored them (or if apt update removed them, but
that’s perhaps a tougher problem).

Regards,

Stephen