Issue
After successfully installing the dvips package, it shows up:
Step 1)
root@CCNM-378B:~# dvips -v
This is dvips(k) 5.997 Copyright 2017 Radical Eye Software (www.radicaleye.com)
But now I'm trying to remove it, and it is invisible to apt:
Step 2)
root@CCNM-378B:~# apt purge dvips
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package 'dvips' is not installed, so not removed
Now I try dpkg, which shows nothing:
root@CCNM-378B:~# dpkg -l | grep "dvips"
Finally, I tried 'apt list' and there are dvips fonts, but nothing else.
root@CCNM-378B:~# apt list | grep "dvips"
dvips-fontdata-n2bk/bionic 0.0.2001.12.12-4 all
So I search for the reverse dependencies (another package that may have installed dvips) using apt-cache:
apt-cache search dvips
and got a list. And successfully removed them all.
But doing Step 1 and 2 above, trying to remove dvips, still doesn't work, and dvips is still installed.
Solution
I would do:
$ dpkg -S $(which dvips)
And that should tell you the package that contains dvips.
You can from there use apt remove or dpkg --remove
to remove the package
Some of the reasons that come to mind for this to happen are:
- the command being part of a package named very differently
- the package being installed outside of apt.
Answered By - Ricardo