LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   how to save a list of installed packages and install these packages later (https://www.linuxquestions.org/questions/ubuntu-63/how-to-save-a-list-of-installed-packages-and-install-these-packages-later-393191/)

mandavi 12-15-2005 11:11 AM

how to save a list of installed packages and install these packages later
 
i screwed my system by changing file permissions recursively from the root folder :( and want to install ubuntu new now - without all the work of going through the package list and pick all the useful packages again.
i found out that i can get a list with 'dpkg -l' but failed when i wanted to store that in a file - nor do i know how to tell dpkg later to install all these packages again.

help would be much appreciated

mandavi

ssfrstlstnm 12-15-2005 11:26 AM

Try this
Code:

dpkg -l > filename
that should store the installed packages in filename. I don't know of anyway to reinstall packages from that list, but the packages are not so important as the config files. You can quickly go through and reinstall packages, but getting everything reconfigured from scratch can be painful. I would suggest that you back up /etc and everything in /home/username that begins with "."

HappyTux 12-15-2005 11:32 AM

Quote:

Originally Posted by mandavi
i screwed my system by changing file permissions recursively from the root folder :( and want to install ubuntu new now - without all the work of going through the package list and pick all the useful packages again.
i found out that i can get a list with 'dpkg -l' but failed when i wanted to store that in a file - nor do i know how to tell dpkg later to install all these packages again.

help would be much appreciated

mandavi


dpkg --get-selections > selections.txt save the .txt file to a safe place then once reinstalled dpkg --set-selections < selections.txt followed by dselect update and apt-get dselect-upgrade show give you back your installed packages.

dl7und 08-15-2006 01:48 AM

That was a very useful advice, Happytux, thanks a lot! As ssfrstlstnm said, config files are important too, but it is also impossible to remember all packages installed on a machine.

So, to replicate a machine (on different architecture, for example), one will need the package list AND the config files... I just went through this (different CPU architecture) and Happytux's advice made it a very easy job...

cautious 08-15-2006 09:27 AM

Along these same lines- is it possible to create an ISO of the whole configuration with all the tweaks, bells, and whistles that I've added to my Ubuntu install, such that I can migrate it to another hard drive?

nopposan 09-07-2009 11:36 AM

thanks and /home/yourhome/.config and all that
 
I know this is a really old thread and you authors have probably already got your questions answered. I just thought I'd say thanks for that bit about the dpkg --get-selections. I'm going to give it a try.

Also, for what it's worth, if you'd like to create your own Ubuntu Live install disk, you can try Ubuntu Customization Kit. There's also Remastersys. I may experiment with these myself. However, especially with regard to Ubuntu (as opposed to pure Debian), I would bet that it'll be easier to just do the dpkg --get-selections thing or save my package list for reinstallation.* Individual settings can be made default for all new users by storing them in /etc/skel. (That is you can store all of your .config type files that are in your personal home folder to /etc/skel and then all new users will get those configurations.) Furthermore, if you save your /home/.config files and your /etc/X11/xorg.conf and just copy them over to a new install, this combined with the same packages being installed should take care of just about all of the customization.

The only thing you won't get that way is the installation and configuration of proprietary drivers; that might be available through Ubuntu's System > Administration > Hardware Drivers though.

* Ubuntu's release cycle is incredibly fast -- every six months -- so if you create your own reinstall disk for the whole OS, it'll soon be obfuscated. That's why I think it's probably better just installing "Jiffy Jackalope" or whatever's the latest and greatest, then copying over the customizations and installing the preferred app's.

Cheers.


All times are GMT -5. The time now is 09:54 AM.