You can reach this article also via this short address:
http://tinyurl.com/8yjrfpf
How to create a list of installed packages - revision 2012.
Originally Posted by
Cynical
(...)
dpkg --get-selections > installed-software
(...)
And if you wanted to use the list to reinstall this software on a fresh ubuntu setup (...)
dpkg --set-selections < installed-software
followed by
(...)
dselect
Thank you, Cynical , for your advise written in 2006. Recently, I tried this out with Kubuntu 12.04 LTS. Now, in 2012, your approach still works quite well: also for *Ubuntu 12.04 LTS. However, a few details are slightly different -eg. the package dpkg only works now with super user privilege. That's why I summarise here how I do it today.
Start at the PC which has a *Ubuntu configuration you like. Open a terminal there and give in the following command:
Code:
sudo dpkg --get-selections > installed-software
..for generating a list of packages at an existing system.
Than, copy the list to the home directory at another configuration: the same computer after a fresh install or another computer at which you want to copy the configuration of the PC where you have generated the list.
There, open a terminal at the PC where you want to install the packages from the list. First install the package "dselect" if it's not already there:
Code:
sudo apt-get install dselect.
Stay in the terminal and give in the following command:
Code:
sudo dpkg --set-selections < installed-software
Then, stay in the same command line and give in this command:
And choose for option 3: "install and upgrade wanted software".
It might take a few hours before all the packages will be installed - however, everything will work automatically from this point on.
Finally, I share with you a few points of attention.
In my opinion, this method is only safe when working with the same version of the same distro at the "old" and "new"configuration: eg. from Kubuntu 12.04 LTS to Kubuntu 12.04 LTS.
However, it is an excellent method to save a lot of time in case you want exactly the same software configuration in a fresh install at the same or another computer. Eg. at my main computer, I upgraded from Kubuntu 11.10 to 12.04 about one month ago. However, the system symply did not work smoothly - it kept crashing several times per day. So,I backed up my data to an external HD and my software configuration to the file "installed-packages". Afterwords, I carried out a fresh install of the same distro and version at the main computer. Via "installed-packages"I regenerated the configuration I want. Now, everything seems to work well again .
In case you would like to start working with a next version of your distro, act as follows:
1. backup all your data;
2. upgrade the existing configuration;
3. generate a.s.a.p. the list of installed packages and backup also that file at a external HD.
3. use this list in case of a fresh install.
About two times per year I carry out a fresh install at both of my computers - with a view to maintaining a well-functioning configuration.
If you want "ttf-mscorefonts-installer": install it first via a graphical package manager.
A nasty detail is the package "ttf-mscorefonts-installer": the package for "microsoft" fonts like Verdana, Arial, etc. If you want this in your system, install it via graphical package manager - only in this way you can indicate accepting the conditions you need to accept in order to be able to install it. !! Please do so before working with the list of installed packages - as summarised above!! Otherwise, the installation process will stagnate somewhere half way. If this happens, give in the following command:
Code:
sudo apt-get purge ttf-mscorefonts-installer
After doing so, the installation process will resume and smoothly come to an end. . Then, go to your graphical package manager: Muon, Synaptic or whatever. From there, install again ttf-mscorefonts-installer.
More than 1 system language?
Another point of attention is relevant in case you have more then 1 "system language" in your system: Dutch, French, Spanish, Italian, Russian or whatever. They do come back in a new system configuration in case they are at the list of installed packages.However, you need to check whether spell checkers for those .languages are present in packages like Firefox, KMail and Libre Office. If so, perfect! If not, act as follows:
+ go to SYSTEM SETTINGS > locale > system languages > tab "uninstall".
+ leave the first system language, UNinstall each other language;
+ then go to the tab "install" and (re)install from there each language you want in your system.
This it it for now ... I hope it benefits someone.
Respectfully yours,
Bas Roufs.
Bookmarks