Thursday, September 8, 2011

how to save and back up all of your packages on ubuntu to reinstall them later on the same or other computer ?


i know ! it is so useful to save your packages that you have installed on your ubuntu .
well lets start ! .....



WHY ? 
well alot of people know why .
but really ! do you have every time you install ubuntu on your computer or someone's to update all your packages and re install all of your program and take every thing back ?
it is like 400 mb of download !
so you have to wait "specially if you have slow connection" and install .
and then you must install ubuntu on a computer with internet connection or else it will be kinda useless!
and specially that it is not normal to see someone sell ubuntu packages CDs !
so now ....
HOW ?
well i got this from ubuntuforums.org  you need to use command line "terminal" .
to open terminal simply click on Applications>Accessories>terminal
OR :
click Alt-F2 and enter "gnome-terminal" then click run ! .
now copy the following codes
 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 one will take some time .
and you need like 2GB free space in your /home/$USER/ .
now after finishing go to your home directory and you will see a folder called "dpkg-repack" inside of it you will find all of the packages!

- how to install them when i need them ? 

simply put the folder "dpkg-repack" in your home directory and open terminal then copy / past those commands :
cd /home/$USER/dpkg-repack/
sudo dpkg -i *.deb 

P.S : if you have renamed the folder that have the packages just simply replace the folder name here just like this :
cd /home/$USER/FOLDERNAME/
and continue ....

insert the password and wait until installing .


when done restart your computer and here you go! every thing is back !

 memo

0 comments:

Post a Comment

gotta some thing to say ?

Note: Only a member of this blog may post a comment.