Daily Linux News.

List All Ubuntu PPAs with Single Command

Ubuntu PPAs are great way to get latest versions of your favorite apps. However, on fresh installation of Ubuntu or when upgrading, you have to re-add these PPAs.

There are methods like copying your sources folder to new installation and changing the distribution string in source list. But I found the method below to be most clean method without any errors.

To list all PPAs on your current system, run the command:

grep -RoPish "ppa.launchpad.net/[^/]+/[^/ ]+" /etc/apt | sort -u | sed -r 's/\.[^/]+\//:/'

Just save them to a text file, make a backup and add the PPAs again as required on new installation. Do note that the command above will list only those PPAs that are hosted on Launchpad. If you have added a PPA that is hosted on different server (VirtualBox for example), it won't be shown.


Post a Comment

About Ubuntu Vibes

Ubuntu Vibes is a blog that brings latest news, tips and tricks about Linux, Ubuntu & Open Source Software. The blog covers desktop & netbook editions and different desktop environments like GNOME & KDE.

Follow Us !!

Twitter Button from twitbuttons.comFollow on FacebookSubscribe to me on YouTubeSubscribe to RSS

Add us on Google Plus !!

Like Us on Facebook