To find packages which have no installation candidate in my current repositories I ran:
apt-show-versions | grep "No available version in archive" (as recommended here)
I think it would be best if one was notified by the package manager that there are packages that were installed from a repository but are not in any of the current repositories anymore. That would be a (separate) issue with the package-manager though.
The command returned packages such as
Now I'd like to find out which of these I can safely remove. I know that I installed some of those by by installing .deb files and these should not be removed.
I already tried running
sudo apt-cache show libgdbm3,
sudo apt show libgdbm3,
sudo dpkg -p libgdbm3 but it only shows (latter command):
Package: libgdbm3 Priority: important Section: libs Installed-Size: 68 Maintainer: Debian QA Group <[email protected]> Architecture: amd64 Multi-Arch: same Source: gdbm Version: 1.8.3-14 Depends: libc6 (>= 2.14), dpkg (>= 1.15.4) | install-info Filename: pool/main/g/gdbm/libgdbm3_1.8.3-14_amd64.deb Size: 30042 MD5sum: 4bd924fc8be5471a12d1e0204c74d6c3 Description: GNU dbm database routines (runtime version) Description-md5: 900375b4641d82391c1c951c3b8647f6 Homepage: http://directory.fsf.org/project/gdbm/ Tag: role::shared-lib SHA256: fbce0e2500aa970ed03665d15822265ff8d31c81927b987ae34e206b9b5ab0b6
and not how this package was installed. When I run
sudo apt-get remove gdbm I get
E: Unable to locate package gdbm.
How to properly clean out packages with no install candidate? And why are they not automatically removed or prompted to be removed when they got installed via a repo but are not in the current repos anymore? (Seems like this should be done every time repos are changed or an upgrade was done.)
System is Debian10/KDE.