O seguinte script lhe dará uma lista como a seguinte:
PPA:tualatrix/ppa
---> ubuntu-tweak
PPA:otto-kesselgulasch/gimp
---> gimp
---> gimp-data
---> gimp-help-common
---> gimp-help-en
---> gimp-help-en-gb
---> gimp-help-es
---> gimp-help-it
---> gimp-plugin-registry
---> libgimp2.0
---> libopenjpeg-dev
---> libopenjpeg5
Seguimento do script (copie-o para um arquivo e torne-o executável):
#! /bin/bash
#
list_all_packages_repos() {
apt-cache policy $(dpkg -l | awk 'NR >= 6 { print }') |
awk '/^[^ ]/ { split(, a, ":"); pkg = a[1] }
nextline == 1 { nextline = 0; printf("%-40s %-50s %s\n", pkg, , ) }
/\*\*\*/ { nextline = 1 }'
}
list_packages_of() { #1 is the tmpfile, is the ppa regexp
grep "" "" | awk '{print "---> ", }'
}
# cache all packages files now
tmpfile=/tmp/list_pcks.$$.txt
list_all_packages_repos > $tmpfile
# listppa Script to get all the PPA installed on a system ready to share for reininstall
for APT in $(find /etc/apt/ -name "*.list"); do
grep -o "^deb http://ppa.launchpad.net/[a-z0-9\-]\+/[a-z0-9\-]\+" "$APT" | while read ENTRY ; do
USER=$(echo "$ENTRY" | cut -d/ -f4)
PPA=$(echo "$ENTRY" | cut -d/ -f5)
echo PPA:$USER/$PPA
list_packages_of "$tmpfile" "$USER/$PPA"
done
done
rm "$tmpfile"