How to delete a persistent menu item

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
berniewalp
Level 1
Level 1
Posts: 13
Joined: Sat Oct 26, 2019 6:18 pm

How to delete a persistent menu item

Post by berniewalp »

I'd be grateful for advice about removing a persistent menu item. I have a "Firefox" entry left over from a botched manual installation. (I have removed everything I can find relating to Firefox but still an entry exists. I've tried "apt remove", "flatpak uninstall", reboot, etc.)

Hoping someone can point me to an answer. Perhaps an ASCII file that governs the menu's contents? Thanks.

Screenshot_from_2021_08_03_11_47_22.png
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
User avatar
Larry78723
Level 14
Level 14
Posts: 5476
Joined: Wed Jan 09, 2019 7:01 pm
Location: Jasper County, SC, USA

Re: How to delete a persistent menu item

Post by Larry78723 »

Try the following command:

Code: Select all

sudo apt purge firefox
Image
If you have found the solution to your initial post, please open your original post, click on the pencil, and add (Solved) to the Subject, it helps other users looking for help, and keeps the forum clean.
revmacian
Level 5
Level 5
Posts: 548
Joined: Wed May 27, 2020 1:50 pm
Location: United States

Re: How to delete a persistent menu item

Post by revmacian »

I'm wondering if this is included in the recent files function - this function doesn't update when files are deleted so it will give a location despite the file no longer existing.
Give a man a fish and you'll feed him for a day. Teach a man to fish and you'll feed him for a lifetime.
US Navy, NEC HM8404
User avatar
AndyMH
Level 21
Level 21
Posts: 13711
Joined: Fri Mar 04, 2016 5:23 pm
Location: Wiltshire

Re: How to delete a persistent menu item

Post by AndyMH »

berniewalp wrote: Tue Aug 03, 2021 6:05 pm Hoping someone can point me to an answer. Perhaps an ASCII file that governs the menu's contents? Thanks.
The menu is built by parsing the contents of /usr/share/applications. In there you will find a lot of .desktop files. These follow a standard format, e.g.

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=HP15C
Exec=hp15c
Comment=
Terminal=false
Icon=hp15c.png
Type=Application
Name[en_GB]=HP15C
GenericName=HP15C
StartupNotify=false
Categories=Utility
If purging doesn't work have a look in there and see if you can find the errant firefox desktop file and delete it.
Thinkcentre M720Q - LM21.3 cinnamon, 4 x T430 - LM21.3 cinnamon, Homebrew desktop i5-8400+GTX1080 Cinnamon 19.0
User avatar
spamegg
Level 14
Level 14
Posts: 5035
Joined: Mon Oct 28, 2019 2:34 am
Contact:

Re: How to delete a persistent menu item

Post by spamegg »

Right-click on the Menu button,
Click "Configure".
Then go to the "Menu" tab.
Click "Open the menu editor".
Here, look through the categories to find your "firefox" menu entry, and uncheck the box next to it!
editor.png
berniewalp
Level 1
Level 1
Posts: 13
Joined: Sat Oct 26, 2019 6:18 pm

Re: How to delete a persistent menu item

Post by berniewalp »

Thanks everybody for the rapid suggestions. Unfortunately no luck. The menu editor shows Firefox nowhere; neither does it appear in any name of any file in /usr/share/applications. (Neither does the character string appear in any text of any file in that directory). It did not appear in the list of recent documents.

I may moot the question as I'm considering replacing the drive with a larger one, in which case I'll install the operating system anew.
HaveaMint
Level 6
Level 6
Posts: 1085
Joined: Fri Feb 02, 2018 9:56 pm

Re: How to delete a persistent menu item

Post by HaveaMint »

Maybe save your firefox bookmarks, once saved rename /home/username/.mozilla to .mozilla.org Start FF and let it start a new folder with defaults. If everything is good add the saved bookmark folder. Once you are sure all is good add one at a time any addons you had.
"Tune for maximum Smoke and then read the Instructions".
berniewalp
Level 1
Level 1
Posts: 13
Joined: Sat Oct 26, 2019 6:18 pm

Re: How to delete a persistent menu item

Post by berniewalp »

Thanks but I don't have any troubles starting firefox from the command-line if I install it from Mozilla's *.tar.bz2 file. It's in a different spot than the mystery entry in the menu. It's the mystery menu entry I'm trying to get rid of.

I discovered a directory $HOME/.local/share/applications that has some *.desktop files (my Arduino IDE and a wine subdirectory). No firefox there either.
SilentBlue
Level 2
Level 2
Posts: 87
Joined: Thu May 16, 2019 11:07 am

Re: How to delete a persistent menu item

Post by SilentBlue »

Try the following:
Right-click on 'Menu' -> 'Configure...' -> 'Menu'
Then uncheck 'Show recent'

If it works, it means the entry probably comes from an item in the 'Recent files' list. To remove the entry definitively (and be able to re-enable 'Show recent' without the problem), open the file manager (Nemo), select 'Recent' in the left panel, and search and remove the item corresponding to your entry.

It worked for me for some menu entries.

For "folder" entries in the menu pointing to a non-existing folder (for example a theoretical path '/media/xxx/foldername') the item is not displayed in the 'Recent' area of Nemo but can still be found in the file ~ /.local/share/recently-used.xbel. Maybe in this case one can edit that *.xbel file directly to remove unwanted items that appear in the Menu but which would not display in 'Recent'?
Locked

Return to “Beginner Questions”