Skip to content

Instantly share code, notes, and snippets.

@binshengliu
Forked from bepcyc/backup with apt.txt
Created April 3, 2012 05:51
Show Gist options
  • Save binshengliu/2289586 to your computer and use it in GitHub Desktop.
Save binshengliu/2289586 to your computer and use it in GitHub Desktop.
BAckup and restore with aptitude in Ubuntu or Debian
before backup:
dpkg --get-selections > packages.txt
while restoring:
dpkg --clear-selections
dpkg --set-selections < packages.txt
aptitude install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment