Clean up Shortcut Icons after Removing Apps in Ubuntu, Fedora & other Linux

After removing an application, the shortcut icon still presents in start menu (app launcher)? Here’s how to trick to remove these unused app icons in Ubuntu, Fedora, and other Linux!

In most Linux, the app shortcut icons are .desktop files located in specific system directories. When removing an app, it also remove the corresponding .desktop file in the most cases.

However, some apps compiled from sources and manually created shortcut icons may NOT have an automate removing process. In the cases, you’ll have unused app icons left in system and present in start menu, while apps themselves already removed.

To remove these app shortcut icons, you just need to find out the corresponding .desktop files and remove them!

As far as I know, there are 3 places that Linux will look for the .desktop files for shortcut icons:

  • /usr/share/applications – system-wide directory for storing shortcut icon (.desktop) files
  • /usr/local/share/applications – another system-wide directory but rarely used.
  • .local/share/applications – the hidden local directory for current user only.

“/usr/share/applications” or “/usr/local/share/applications”

App store or Software Manager will mostly install app icons into “/usr/share/applications“. And, they remove them automatically during uninstalling process.

In case you compiled an application from source tarball, but there’s no make uninstall option. User can remove the shortcut file by opening file manager and manually navigate to either “/usr/share/applications” or “/usr/local/share/applications“.

Then find out and remove the corresponding .desktop file.

NOTE: Files there belong to root user. You need to right-click on blank area  in that folder, and select “Open in Terminal” (or “Open Terminal Here”). Then in pop-up terminal, run command to remove a file:

sudo rm FILE_NAME_HERE.desktop

“.local/share/applications”

Third-party applications (such as WebApp Manager and Wine) and custom scripts usually create .desktop shortcut files in .local/share/applications directory.

It’s a hidden folder. User has to press Ctrl+H in file manager to show/hide the folder and navigate to that directory.

Files there usually belong to you, just remove a .desktop file will make the corresponding app icon disappear from start menu (app launcher).

App Shortcut files for Flatpak Applications

Unlike Snap, applications installed as universal Flatpak packages use another directories for their shortcut icons.

They are:

  • /var/lib/flatpak/exports/share/applications/” for system wide.
  • ~/.local/share/flatpak/exports/share/applications/” for current user only.

Just in case you want to manually edit or remove Flatpak shortcut icon files, go check both folders above.

NOTE: files in /var/lib/flatpak/exports/share/applications/ are symbolic links. Original files are located in /var/lib/flatpak/app/AppID/current/active/export/share/applications/filename.desktop. Where AppID is something looks like com.github.xxx or org.gnome.xxx.

Hi, I'm Merilyn Ne, a computer geek working on Ubuntu Linux for many years and would like to write useful tips for beginners. Forgive me for language mistakes. I'm not a native speaker of English.