Clear and Disable Recent Documents in Ubuntu

When you open Nautilus (the default file manager) in Ubuntu, there is a “Recent” entry on the left pane that allows you to view the recent files that you have opened. If you have recently opened a confidential files (or watched a prohibited video), you definitely don’t it the system to log it and show it in the “Recent” place. Here is how you can clear and disable recent documents in Ubuntu.

1. Open Nautilus (or Files) and click on the “Recent” entry in the left pane.


2. Select all the files, right click and delete them. Do not worry, you are not deleting the actual files, only the log.

3. Open a terminal and type the following:

sudo chattr +i ~/.local/share/recently-used.xbel

All your recently opened documents won’t be logged now.

To enable the logging of recent document, use the command:

sudo chattr -i ~/.local/share/recently-used.xbel

That’s it.


Damien Oh started writing tech articles since 2007 and has over 10 years of experience in the tech industry. He is proficient in Windows, Linux, Mac, Android and iOS, and worked as a part time WordPress Developer. He is currently the owner and Editor-in-Chief of Make Tech Easier.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox