During upgrades between releases of a Debian (or Ubuntu) system you can end up with a lot of trash ... packages left over from earlier releases. Using the following command you can find packages that are not available from any of the APT repositories you've configured in
/etc/apt/sources.list (or
/etc/apt/sources.list.d/*):
for pkg in $(dpkg --get-selections | awk '{print $1}'); do grep "^Package: $pkg\$" /var/lib/apt/lists/*binary*Packages > /dev/null 2>&1 || echo "$pkg"; done
These packages might have been manually installed or are remnants of a previous OS release. You should review the list and decide for yourself whether to keep them or purge them.
Note that the above command does not show packages for which the current version was manually installed from a DEB, but the package is available from a repository too.
For a more thorough list (packages for which the currently installed version is not from a repository ... including packages for which an update is available from the respective repository), try this:
apt-cache policy '.*' | awk '/^[a-z0-9]/{pkg = substr($1, 1, length($1) - 1)}/ *\*\*\*/ {getline; if (index($0, "/var/lib/dpkg/status") != 0) print pkg}' | sort
(Don't forget to upgrade all packages to the current latest version or they'll be listed too.)
Recent comments
2 days 19 hours ago
1 week 6 days ago
2 weeks 2 hours ago
2 weeks 4 hours ago
2 weeks 18 hours ago
2 weeks 1 day ago
2 weeks 4 days ago
2 weeks 4 days ago
4 weeks 2 days ago
4 weeks 2 days ago