How To: Ubuntu Clear and Disable Recent Documents

When it comes to clearing and disabling recent documents in Ubuntu not much has changed over the years apart from where the recently-used.xbel document is stored (~/.local/share).

Note: This post has been updated March 2014.

Ever wondered how to hide your tracks and disable the "Recent Documents" folder inside Ubuntu. Well here is a How To: Ubuntu Clear and Disable Recent Documents that is broken down for the newbie to grasp and learn some of the inner workings of Linux.

Open up a Terminal window by clicking on Application / Accessories / Terminal from the top panel menu and enter the following set of commands:

Update from March 2014

...@her###:~$ rm ~/.local/share/recently-used.xbel

First we remove (rm) the file recently-used.xbel (~ points to the root of you $HOME direcotory) which is used to store a list of recently used documents.

...@her###:~$ touch ~/.local/share/recently-used.xbel

Touch creates a new file recently-used.xbel.

...@her###:~$ sudo chattr +i ~/.local/share/recently-used.xbel

Finally we give the file the i(1) attribute which cannot be modified, deleted, or linked to, making it clean of any information.

Now when you check Places / Recent Documents again, it should be greyed out and disabled.

Should you one day change your mind and want to get back your "Recent Documents" just remove the 'i' attribute from the file.

...@her###:~$ sudo chattr -i ~/.local/share/recently-used.xbel

(1) A file with the 'i' attribute cannot be modified: it cannot be deleted or renamed, no link can be created to this file and no data can be written to the file. Only the superuser or a process possessing the CAP_LINUX_IMMUTABLE capability can set or clear this attribute.


No comments:

Post a Comment