Todos los paquetes con su descripcion y estado actual
dpkg -l
Buscar los paquetes que empiezan por g, y mostrar su estado
dpkg -l | grep '^....g'
aptitude search '~i(~n gr)'
Mostrar todos los paquetes que empiezan por gr
dpkg -l | awk '{print $2}' | grep ^gr
List all packages ordered by installed size The easiest way (without installing extra packages) is:
dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n
which displays packages in size order, largest package last.
Unfortunately on at least some systems, this list includes packages that have been removed but not purged. All such packages can be purged by running:
dpkg --list |grep "^rc" | cut -d " " -f 3 | xargs sudo dpkg --purge
Or if you don’t want to purge uninstalled packages you can use this variant to filter out the packages which aren’t in the ‘installed’ state from the list:
dpkg-query -Wf '${db:Status-Status} ${Installed-Size}\t${Package}\n' | sed -ne 's/^installed //p'|sort -n
To find which package owns a directory:
dpkg -S /directory/to/be/checked