How do I re-install all the deb’s I had from an existing Debian/Ubuntu install?

Mostly because I’m an idiot, but at least I had a backup in hand.

the debs are kpe tin /var/cache/apt/archives

So a simple script like this:

ls -l *.deb | awk '{print $9}' | sed -e 's/_/\ /g' | awk '{print "apt-get install "$1}' > /tmp/missing

Will go ahead and prep a simple script to re-add everything. Obviously I don’t pass it into a sudo’d bash, but heh it works.

Probably one of my quicker recoveries, since I had all the data & config’s just lost the OS.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.