dpkg - > is a debian package manager command
dpkg -l - > will list all the packages with their status installed/deinstalled/removed/half-installed etc
The first 2(actually 3) letters of the output of " dpkg -l " command are significant to us, because it tells the current state of the package. if it is
ii - installed
rc - removed but configuration files are kept
So, " $dpkg -l | grep ^rc "
will display all the package that are removed but configuration files are still kept.
Note: if you purged configuration files of a package during removal using
"apt-get remove --purge < package_name >" then those packages will not be displayed.
For more information about dpkg :
i) man dpkg
ii) dpkg -l - > Read the first 4 lines ;-)
iii) Read this http://linuxprograms.wordpress.com/2010/05/11/status-dpkg-list/
dpkg -l - > will list all the packages with their status installed/deinstalled/removed/half-installed etc
The first 2(actually 3) letters of the output of " dpkg -l " command are significant to us, because it tells the current state of the package. if it is
ii - installed
rc - removed but configuration files are kept
So, " $dpkg -l | grep ^rc "
will display all the package that are removed but configuration files are still kept.
Note: if you purged configuration files of a package during removal using
"apt-get remove --purge < package_name >" then those packages will not be displayed.
For more information about dpkg :
i) man dpkg
ii) dpkg -l
iii) Read this http://linuxprograms.wordpress.com/2010/05/11/status-dpkg-list/