why `dpkg -l | grep package` is showing a package after being purged
6,676
Note the first two letters of the output of dpkg -l tor
which says un
u: Unknown (an unknown state)
n: Not- The package is not currently installed
sometimes dpkg
keeps such entries for references. To remove those problematic entries, run in terminal,
sudo dpkg --clear-avail
From man dpkg
--clear-avail
Erase the existing information about what packages are
available.
Related videos on Youtube
![Mohammad Reza Rezwani](https://i.stack.imgur.com/SeeDV.jpg?s=256&g=1)
Comments
-
Mohammad Reza Rezwani almost 2 years
To uninstall a package (Ex: tor) installed from repository one should use
sudo apt-get remove tor
I did this but
dpkg -l | grep tor
shown something against the package. Next I trysudo apt-get purge tor
But when I check
dpkg -l | grep tor
I got,reza@reza-N43JM:/$ dpkg -l tor Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Description +++-==============-==============-============================================ un tor <none> (no description available)
I think when I uninstall any package I should not get anything in
dpkg -l
list. Is it true? Orapt-get remove
orpurge
does another work but not uninstall? -
wsw over 8 yearsUsing
sudo dpkg --clear-avail
doesn't work for me. -
HeinrichStack over 7 yearsNeither for me. (Ubuntu 16.04 LTS)