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