How to Hide App Shortcut Icon in Ubuntu 22.04 | 20.04 & Other Linux

Got an application, but you want to make it in-visible from start menu, app grid, app launcher search result, and dock launcher?

It’s easy to do the trick by adding rule NoDisplay=true or Hidden=true into the ‘.desktop’ file for that application. And, here’s how to do it step by step.

Hide Shortcut Icon for native Deb/RPM & Snap apps

For applications installed as the native .deb (or .rpm for RPM based systems), and Snap packages, the ‘.desktop’ files are usually stored in /usr/share/applications directory.

1. First, open terminal either from start menu or by pressing Ctrl+Alt+T on keyboard in Ubuntu. When it opens, run command to navigate to that folder:

cd /usr/share/applications/

2. Then, find out the .desktop file by either listing all of them via ls command. Or, filter via:

ls | grep 'keyword_here'

3. Once you find out the .desktop file for your applications, edit it via command:

sudo gedit your_application.desktop

Replace gedit with your system text editor, or use nano command line editor that works in most Linux.

4. Finally, add (or change value if the key already exist) the line below:

NoDisplay=true

Finally, save the file. For nano text editor, press Ctrl+X, type y and hit Enter.

In next time you logging into the system, the app shortcut will no longer exist in start menu, app grid, the left/bottom dock, and ‘Activities’ overview search result.

Hide Shortcut Icon for Flatpak Apps

For the universal Flatpak applications, the ‘.desktop’ files are located in ‘/var/lib/flatpak/exports/share/applications/‘ directory.

1. So, first open terminal and run command to navigate to that folder:

cd /var/lib/flatpak/exports/share/applications/

2. Use ls or ls |grep 'keyword' to find out the file.

3. Finally, edit it either via Gedit or other text editor:

sudo gedit your_application.desktop

Add the NoDisplay=true line and save the file. Also, log out and back in to see result.

Copy & paste the .desktop file into local folder

The previous change may be overridden after updating the software package. As a workaround, you may copy & paste the .desktop file into local folder and then do the change. Your system will always take use of the local one.

For native package and Snap, open terminal and run command to copy the file:

sudo cp /usr/share/applications/your_app.desktop ~/.local/share/applications/

Then, navigate to local directory, change the ownership, and finally edit the file:

cd ~/.local/share/applications/ && sudo chown $USER:$USER your_app.desktop && gedit your_app.desktop

For Flatpak applications, the local folder is “~/.local/share/flatpak/exports/share/applications/“. So, do the commands below instead:

sudo cp /var/lib/flatpak/exports/share/applications/your_app.desktop ~/.local/share/flatpak/exports/share/applications/
cd ~/.local/share/flatpak/exports/share/applications/ && sudo chown $USER:$USER your_app.desktop && gedit your_app.desktop