Howto Backup all installed programs/packages in Ubuntu/Kubuntu



PROBLEM: Lets say you have set up your *buntu box. Now you want to backup all the installed deb files so that you can restore them quickly and efficiently.


These commands will do that for you.

Open a terminal and paste the following into it:

$ sudo apt-get install dpkg-repack fakeroot

$ mkdir ~/dpkg-repack; cd ~/dpkg-repack

$ fakeroot -u dpkg-repack `dpkg --get-selections | grep install | cut -f1`

(the last command will take some time)

Now if you scroll to your home folder, you should find a folder called "dpkg-repack" which should have all the deb files of all your installed packages.

Reinstall Packages

If you want to re-install the packages, navigate to the folder with the packages and input the following command in the terminal:

sudo dpkg -i *.deb




0 comments: