aptitude
Table of Contents
- 1. Description
- 2. Quick guide to search terms
- 3. Output format (can be modified with the
-Fflag) - 4. Explain why
packageshould be installed - 5. Search packages by
Origin - 6. Search package by
Section - 7. Download and display the changelog of
package - 8. List
recommendspackages that are not installed - 9. Related nodes
- 10. References
1. Description
The aptitude manual can be found locally at /usr/share/aptitude/README.
2. Quick guide to search terms
Search for “Quick guide to search terms” in the package README.
3. Output format (can be modified with the -F flag)
- /usr/share/aptitude/README (search for “Customizing the package list”)
- https://www.debian.org/doc/manuals/aptitude/ch02s05s01.en.html
The first character of each line indicates the current state of the package.
pNo trace of the package exists on the system.cDeleted but its configuration files remains on the system.iPackage is installed.vPackage is virtual (see https://www.debian.org/doc/manuals/debian-faq/pkg-basics.en.html#virtual).
The third character A means the package was automatically installed.
4. Explain why package should be installed
apt equivalent: notes:apt-cache#rdepends
aptitude why PACKAGE
5. Search packages by Origin
See notes:apt-cache to find Origin.
apt equivalent: notes:apt#pkg-list-origin
5.1. List installed packages whose Origin is Raspberry Pi Foundation
aptitude search "?origin(Raspberry Pi Foundation) ?installed"
5.2. List installed packages whose Origin is not Debian
Long and short form of the same command, see #search-terms.
aptitude search '?narrow(?installed, ?not(?origin(Debian)))' aptitude search '~S ~i !~ODebian'
6. Search package by Section
6.1. List installed packages and their Section
aptitude -F '%p|%s' search '~i'
6.2. Amount of packages installed from each Section
aptitude -F '%s' search '~i' | sort | uniq -c | sort -n
6.3. List packages from Section fonts that are not installed
aptitude search '!~i ?section(fonts)'
7. Download and display the changelog of package
aptitude changelog bash
8. List recommends packages that are not installed
aptitude search '?broken-reverse-recommends(~i)'