If you really use the recent files menu in Linux Mint 17.2 Cinnamon, there are times when your menu gets flooded with files that you don’t want there. Like when you are browsing photos and all of a sudden all you see in your menu is photos. Now the stuff you really need is buried under the not so important photos. Follow this procedure to clear up the menu..
The Recent Files in the cinnamon menu looks like this:
From this, for whatever reason, I would like to remove the final.jpg entry. I do not want to clear the list completely as I use it to revisit files.
Open up terminal and cd to ~/.local/share
$ cd ~/.local/share
Now use vi to open the recently-used.xbel file
$ vi recently-used.xbel
The recently-used.xbel file consists of bookmarks that the cinnamon menu uses to display the recent files. All we have to do is remove the <Bookmark></Bookmark> blocks pertaining to the file we need to delete from our menu.
In my case the lines look like this:
<bookmark href="file:///home/shaik/Pictures/final.jpg" added="2015-12-14T13:56:01Z" modified="2015-12-14T13:56:01Z" visited="2015-12-14T13:56:05Z"> <info> <metadata owner="http://freedesktop.org"> <mime:mime-type type="image/jpeg"/> <bookmark:groups> <bookmark:group>Graphics</bookmark:group> </bookmark:groups> <bookmark:applications> <bookmark:application name="Image Viewer" exec="'eog %u'" modified="2015-12-14T13:56:01Z" count="1"/> </bookmark:applications> </metadata> </info> </bookmark>
Locate the bookmark with your filename and delete that whole bookmark block. You can do this by hitting dd on the line to be deleted. To delete multiple lines hit <number_of_lines>dd. For example if your bookmark is 15 lines long 15dd on the start of the particular bookmark tag should delete the whole block.
Save the file with the wq command and exit vi editor.
Now opening up the recent files in the cinnamon menu should show you the files sans the one that you deleted.