Ubuntu – How to get a list of all packages installed from PPAs even for PPA repositories that may have been removed


I've already seen this question:

How to list all the packages which are installed from PPAs?

It only works for packages installed from PPAs where the PPA repository is still added to the system.

Is there a way to get the same kind of list but including all packages from all PPA repositories that are current added or have been added in the past?

Best Answer

You may search for installed obsolete packages, either locally installed or their source repository is disabled)

aptitude search '?narrow(?installed, ~o)'

Also if you want both obsolete + ppa ones:

aptitude search '?narrow(?installed, ~Oppa | ~o)'

Reference: aptitude - Search term reference