How To Delete And Disable Recent History Log In Ubuntu Linux [Tip]

When files or folders are accessed in an operating system, a log of recently accessed files and folders is generated. While this can be useful to quickly open recently opened files and folders, it can also invade your privacy. As others who use the same computer can end up accessing these files. Furthermore, unlike Windows recent files and folders log (as explained here), it is a bit tricky to access access recent files history in  Ubuntu.  In this post I will tell you how to delete recent history in Ubuntu and how to disable/re-enable recent history log to protect your privacy.

Delete Recent History

To  delete recent history, open the Terminal and enter the following command:

rm ~/.local/share/zeitgeist/activity.sqlitezeitgeist-daemon --replace

Explanation: activity.Sqlite is a file located in the share directory with this path in the Home Folder: ~/.local/share/zeitgeist/activity.sqlite. To view this file you will require unhiding hidden files and folders by hitting CTRL+H hotkey.

Recent History

Disable Recent History

To prevent new items from being logged, enter this command in the Terminal:

echo -n > ~/.recently-used.xbelsudo chattr +i .recently-used.xbel

Enable recent History Again

If you want to revert the changes for enabling logging again, enter the below command in the Terminal:

sudo chattr -i .recently-used.xbel

[This tip was posted by Multifo at Ubuntu Forums]