I'd like to output a list of all installed packages into a text file, so that I can review it and bulk-install on another system. How to do this?
|
To get a list of packages installed locally and save as a text file called
(you don't need to run this as the superuser, so no "sudo") |
|||||||||||||||
|
Create a backup of what packages are currently installed:
Then (on another system) restore installations from that list:
To get rid of stale packages
To get installed like at backup time
|
|||||
|
|
The command you need is
|
|||||||||||||||||
|
|
To get just the packages which were expressly installed (not just installed as dependencies), you can run
This will also include a brief description, which you may want. If not, use the option caveat: as pointed out by gertvdijk in the comments, Yet another option seems to be to copy the file
|
|||||||||||||
|
|
You can use Synaptic to save the current state of your installed packaged. In Synaptic, select "file/save markings", Enter the name of the file to save the state to, and make sure to check the "Save full state, not only changes" box. The file saved from this can be loaded into a new machine using "file/read markings" in Synaptic. |
|||
|
|
|
you want to reinstall the packages now there on 12.04 rite? if so,its very easy.
PS:For this you need a "SINGLE SIGN ON UBUNTU ACCOUNT"(b4 reinstalling create it so that your pc is syncd) |
|||
|
|
|
To list all packages intentionally installed by apt commands, run the following :
This provides a reverse time based view, with older commands listed first:
Installation data also showing synaptic usage, but without details (the same with installation date) :
providing the following:
|
||||
|
|
To list all installed packages,
Note: |
|||
|
|
|
dpkg-query (instead of dpkg --get-selections, which lists some packages that are not installed) as follows:
Or:
|
||||
|
|
|
I recommend using blueprint. Even though it is designed for servers, it can be also used from desktops as well. It will create a shell script/chef/puppet that you ca use to re-install all you packages. |
|||
|
|
