I uninstalled Okular in Ubuntu 18.04 but its icon still persists in Show Applications (not the usual icon however, but a generic one, see screenshot below).
I have checked ~/.local/share/applications
and /usr/share/applications
for a .desktop
file, but I don't find any there that belong to Okular.
I have tried all the following commands with no success:
sudo apt remove okular
sudo apt remove --auto-remove okular
sudo apt purge okular
sudo apt purge --auto-remove okular
How can I remove the Okular icon from the Show Applications menu??
See the screenshot:
I'm going to assume you installed okular from Ubuntu Software. In that case the 1st listed is a snap version & likely what you installed.
All kde snaps suffer from the same uninstall flaw where the .desktop file is not removed. You will have to do so manually as root. The location of snap's .desktop files is,
/var/lib/snapd/desktop/applications
The probable name of the file is
okular_org.kde.okular.desktop
You can browse there to confirm it's existence, to get the file name one easy way is to DnD the file into a terminal.
So here the command to remove is
This highlights one of the issues with snaps, many times one has to go far out of there way to report a bug. In this case, see https://forum.snapcraft.io/t/kde-snaps-flaw/8977. You'd think the KDE snap dev's would have noticed this as it's been happening for quite some time now..