apt-cache dump --installed doesn't work, it lists uninstalled packages as well.
I want to list the install packages each by one line, with the installed version number.
|
|
|
try it lists you the packages, version and a short description. |
|||
|
|
|
Simplest, but might show a few extraneous packages and truncates long package names and version numbers:
To list only correctly installed packages and not truncate names:
To get more control over the output format, you can use
|
|||
|
|
It gives you also info of the package state (up to date, upgradable, ...) This program is separately packaged to apt-show-versions pkg. Install it first with:
|
|||
|
|
|
To list the names of each installed package, type as a superuser :
You will get an output like this :
To remove the unecessary "install" character string, you can use sed :
And if yout want to save it to a file called InstalledPackages, you type this :
|
||||
|
|
|
The following command is a solution that additionally can help to install the listed packages in their listed versions later again (on the same or another system):
Each line will contain package name, version and an optional "A" if the package was installed automatically. Source: "Cloning a Debian system - identical packages and versions". See there too for a little script to re-setup a system from the saved list of packages and versions. |
|||
|
|