Wednesday, November 02, 2011

Repackage (backup) installed debian packages

These commands let you backup one or all of your installed packages.

To backup one installed package
dpkg-repack xbmc
or all of them at once
dpkg-repack `dpkg --get-selections | grep install | cut -f1`
Both these commands will create .deb-packages in the directory you're currently in.

If you want to install one of the packages
dpkg -i package_name.deb
or all of them at once
dpkg -i *.deb

Very handy.