Skip to content

Instantly share code, notes, and snippets.

@hfase01
Last active January 4, 2016 15:19
Show Gist options
  • Save hfase01/8639779 to your computer and use it in GitHub Desktop.
Save hfase01/8639779 to your computer and use it in GitHub Desktop.
#!/bin/bash
#########
##
## This script simply lists the installed PPA's on Ubuntu.
##
## To run this script right from GitHub use the following command.
##
## ~$ curl -s https://gist.github.com/hfase01/8639779/raw/listppa | sh
##
##########
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 sudo apt-add-repository --remove ppa:$USER/$PPA
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment