Sebastian Kayser wrote: Rakotomandimby Mihamina wrote:
I would like to save the names of all the installed packages. # dpkg -l | awk '{print $2}' Does the work, but some packages with long names are name truncated. What's the option to provide to display the full name?
a) You may try to call dpkg -l with COLUMNS set to more than 80.
# COLUMNS=120 dpkg -l | awk '{ print $2 }'
See 'man +/COLUMNS dpkg'.
b) You can also get the list of installed packages via
# dpkg --get-selections | awk '{ print $1 }'
- sebastian
Or use the following to print just the installed packages otherwise all
packages including deinstall are printed:
dpkg --get-selections | awk '{ if($2 =="install") print $1 }'
--
Carl