Related to this question. But my concern is that over the past year, most of my more interesting (or used) applications are from PPAs, and just backing up my sources list won't add the associated launchpad keys the way that add-apt-repository
does.
So I'm looking for a way to list all the PPA urls (like ppa:chromium-daily/stable
) so that I can easily script a series of add-apt-repository commands to add them into a new installation gracefully.
Short of dumping my bash history of course. Which might be feasible, depending on how far back that file goes back?
Best Answer
Well because I like mucking around with command line scripting, I've written the following. It generates a list of PPA strings that you could backup and then script into
add-apt-repository
:That'll generate something like:
If you ever wanted to blanket-restore those, you could pipe them back into the system like so (assuming we saved the PPAs to
~/ppa-backup.txt
:I would probably suggest you don't just restore them all. Look through the backup and make sure you know what each PPA contains.