$ wajig list |grep -Pv ^iiThere you will see a two letter code
First letter -> desired package state ("selection state"):
Second letter -> current package state:
Third letter -> error state (you normally shouldn't see a third letter, but a space, instead):
So for example:
ii means 'It should be installed and it is installed' whereas
rc means 'It's removed/uninstalled but it's configuration files are still there'
$ aptitude purge ~c # same as aptitude purge ?config-files
$ apt-get purge ".*:i386" $ dpkg --remove-architecture i386
$ dpkg --audit
Some packages get installed due to dependency - they are needed by other packages - others because of recommends and still others due to suggests
( see your apt.conf setting ).
And some Packages are installed because of a tree of depends which makes it hard to figure out where they came from.
Aptitude has a why command - here is an example.
$ aptitude why libxcb-shm0 i libpoppler46 Recommends poppler-data i A poppler-data Suggests poppler-utils i A poppler-utils Depends libcairo2 (>= 1.12.0) i A libcairo2 Depends libxcb-shm0
At the top of the tree - we have libpoppler46 - this package recommended poppler-data - and via a suggests setting ( see your apt.conf settings to turn this off ) it installed poppler-utils - leading to two more packages installed via dependencies. At this point it is a good idea to figure out what the top package is for - do you really want it?
$ aptitude show libpoppler46Returns a line that tells me that
Description: PDF rendering library Poppler is a PDF rendering library based on Xpdf PDF viewer.
I remember that I no longer need any pdf rendering so I can remove it from the top.
$ aptitude show ~o # which means = aptitude show ?obsoleteThen to delete them:
$ aptitude purge ~o # which means = aptitude show ?obsolete
Orphaned packages are automatic dependencies whose "dependants" have all been uninstalled.
$ wajig listorphans $ wajig purgeorphans
adduser apt apt-listchanges apt-utils aptitude aptitude-common at base-files base-passwd bash bash-completion bc bind9-host bsd-mailx bsdmainutils bsdutils bzip2 coreutils cpio cron dash dbus dc debconf debconf-i18n debian-archive-keyring debian-faq debianutils diffutils dmidecode dnsutils doc-debian dpkg e2fslibs e2fsprogs exim4 exim4-base exim4-config exim4-daemon-light file findutils ftp gcc-4.8-base gcc-4.9-base gcc-6-base gettext-base gnupg gpgv grep groff-base gzip hdparm host hostname ifupdown info init init-system-helpers initscripts install-info iproute2 iptables iputils-ping isc-dhcp-client isc-dhcp-common kmod krb5-locales less libacl1 locales login logrotate lsb-base lsof m4 man-db manpages mawk mime-support mlocate mount multiarch-support mutt nano ncurses-base ncurses-bin ncurses-term net-tools netbase netcat-traditional nfacct nfs-common openssh-client passwd patch pciutils perl perl-base perl-modules perl-modules-5.24 procmail procps python python-apt python-minimal python-reportbug python-support python2.7 python3-reportbug readline-common reportbug rpcbind rsyslog sed sensible-utils startpar systemd systemd-sysv sysv-rc sysvinit-utils tar tasksel tasksel-data telnet texinfo time traceroute tzdata ucf udev util-linux vim-common vim-tiny w3m wamerican wget whiptail whois xz-utils zlib1g
This information may have errors; It is not permissible to be read by anyone who has ever met a lawyer.
Use is confined to Engineers with more than 370 course hours of electronic engineering for theoretical studies.
ph +1(785) 841-3089
(C) Copyright 1994-2017, Transtronics, Inc. All rights reserved
Transtronics® is a registered trademark of Transtronics, Inc.
All trademarks are the property of their respective owners.