I installed many packages from many PPAs on my system. I want to list all the installed packages which are installed from launchpad PPAs, not repositories.
Is this possible through command-line?
aptcommand lineppa
I installed many packages from many PPAs on my system. I want to list all the installed packages which are installed from launchpad PPAs, not repositories.
Is this possible through command-line?
Best Answer
The following command returns the package name and its ppa (if installed from a ppa):
Details:
dpkg --get-selections
gives only the installed packages aftergrep -v deinstall$
awk '{ print $1 }'
returns only the package nameperl -e '@a = <>; $a=join("", @a)'
concatenates all the lines returned byapt-cache policy
$a =~ s/\n(\S)/\n\n$1/g;
adds a newline between each package section@packages = split("\n\n", $a);
is a perl array containing all the packages infos, one package per item.foreach $p (@packages) {print "$1: $2\n" if $p =~ /^(.*?):.*?500 http:\/\/ppa\.launchpad\.net\/(.*?)\s/s}
is a loop where the package and the ppa are printed if a ppa with prio 500 is found in the policy.