Monday·08·August·2011
Finding libraries not marked as automatically installed with aptitude //at 17:26 //by abe
This is a direct followup on my blog posting Finding packages for deinstallation on the commandline with aptitude.
In the meantime on more alias for finding obosolete packages made it into my zsh configuration. It’s an alias to find installed libraries, …-data, …-common and other usually only automatically installed packages, which are not marked as being installed automatically nevertheless:
alias aptitude-review-unmarkauto-libraries='aptitude -o "Aptitude::Pkg-Display-Limit=( ^lib !-dev$ !-dbg$ !-utils$ !-tools$ !-bin$ !-doc$ !^libreoffice | -data$ | -common$ | -base$ !^r-base ) !~M"'
And yes, this pattern is slightly larger than those from the previous posting, so here’s the used filter in a little bit more readable way:
( ^lib !-dev$ !-dbg$ !-utils$ !-tools$ !-bin$ !-doc$ !^libreoffice | -data$ | -common$ | -base$ !^r-base ) !~M
It matches all non-automatically installed packages whose name starts with “lib”, but is neither a debug symbols package, a development header package, a documentation package, a package containing supplied commands, nor a libreoffice package.
Additionally it matches all non-automatically installed packages ending in -data, -common, or -base, but excludes r-base packages.
Of course you can then mark any erroneously unmarked library by pressing “M” (Shift-m).
If you press “g” for “Go” afterwards and wonder why nothing to remove shows up, be reminded that the filter limit is active in this view, too. So press “l” for “Limit” and then Ctrl-u to erase the current filter limit of this view and press enter to set the new (now empty) filter, et voilà…
Hope this is of help for some others, too.
Tagged as: aptitude, CLI, Debian, filter, nemo, Netbook, Package Management, pattern, Planet Debian, UUUCO
// show without comments // write a comment