How can I clear the recently used and viewed files without using terminal?
-
1What's wrong with the terminal? You can always create a graphical shortcut for a terminal command.– Adam ByrtekApr 11, 2011 at 21:29
-
3Well we linux fans wouldn't mind...but new users migrating from other OS might prefer a GUI method to clear recently viewed files.– nik90Apr 11, 2011 at 21:30
-
3on ubuntu 10.10 you have an option in the menu for that. i think it is faster and easier to use via gui– PascalApr 11, 2011 at 21:35
9 Answers
It depends on whether you're using Unity or the Classic desktop.
In Unity, the recent documents that you see in the Files lens are logged using Zeitgeist. If you don't want to use the terminal to remove these, or only want to remove a few of them, the best thing to do is install "Activity Journal" using the Software Center. Fire up the Activity Journal, and you'll see all your recently used apps and documents, grouped by day. If you right click a document and click "Delete item from Journal", Zeitgeist will forget that you used that document at that specific time. If you click "Delete all items with this URL", Zeitgeist will forget you ever used that document. If you want to delete everything, this terminal command (which others have already posted) will do the job:
rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace
There's a Zeitgeist Global Privacy app in development which will make this easier, but unfortunately it's not released yet.
The Classic desktop (and the lists of recently used files in most applications' File menus) stores a record of your recently used documents in ~/.local/share/recently-used.xbel. You can just delete this file using the file manager or copy and paste the following code into a terminal:
rm ~/.local/share/recently-used.xbel
Hope that helps!
The only way I know how to do this is to install Ubuntu Tweak, which can be found by going to http://ubuntu-tweak.com/ and installing the software.
Open Ubuntu Tweak up and go to Gnome Settings then uncheck Enable System Wide "Recent Documents" List
-
thanks for the answer. i tried to install ubuntu tweaks a few days ago but it requires python <2.7 and 2.7.1 is part of natty. so i have to wait for an update– PascalApr 12, 2011 at 7:21
-
launchpad.net/~tualatrix/+archive/ppa is the Ubuntu Tweak PPA which will install for you without any unmet dependency problems happening. Apr 14, 2011 at 16:59
-
This solution no longer works. I'm on Classic desktop and unticked the option as I usually did after a fresh install, but recent documents keeps accumulating.– OxwiviMay 14, 2011 at 5:35
You can use bleachbit
from its homepage on SourceForge or install it through the Software Center.
It can delete all unnecessary files, and system cache.
Open BleachBit and then check your preferences:
for deleting recent documents, only select System→recent documents
Upgrade to 12.04. It comes with a cleaner and settings wizard by default.
Under System Settings click Privacy, there is an option to clear the recent history.
In Ubuntu 16.04's Nautilus click on "Recent" in left pane and this screen appears:
Highlight the files you want removed from the Recent list and use right click to bring up the context menu. Then select Remove from Recent
.
Run the following commands in your terminal:
rm ~/.local/share/zeitgeist/activity.sqlite
zeitgeist-daemon --replace
-
2
A while ago, I've developed a recent files indicator for Ubuntu 16.04 LTS, which was meant as personal project although I've used it to answer couple other questions here on Ask Ubuntu, particularly here and here. Among other features, it has an option to clear recently used files.
Obtaining the indicator is fairly simple:
sudo add-apt-repository ppa:1047481448-2/sergkolo
sudo apt-get update
sudo apt-get install files-indicator
This is what works for me, DISABLING ALL LOGGING.
Copy these three lines to a blank text file:
CREATE TRIGGER IF NOT EXISTS no_logging_uri AFTER INSERT ON uri BEGIN DELETE FROM uri ; END;
CREATE TRIGGER IF NOT EXISTS no_logging_event AFTER INSERT ON event BEGIN DELETE FROM event ; END;
CREATE TRIGGER IF NOT EXISTS no_logging_text AFTER INSERT ON text BEGIN DELETE FROM text ; END;
Let's suppose you named the file as triggers.sql
. The next thing to do is apply these triggers on the activity database:
$ cat triggers.sql | sqlite3 ~/.local/share/zeitgeist/activity.sqlite
If you want to restore the standard functionality simply remove the database (it will be recreated without the triggers):
$ rm ~/.local/share/zeitgeist/activity.sqlite
remove all children of xml file ~/.local/share/recently-used.xbel
<?xml version="1.0" encoding="UTF-8"?>
<xbel version="1.0"
xmlns:bookmark="http://www.freedesktop.org/standards/desktop-bookmarks"
xmlns:mime="http://www.freedesktop.org/standards/shared-mime-info"
/>
and
$ sudo chattr +i ~/.local/share/recently-used.xbel
to make it immutable. drop all event item in sqlite3 database and also make it immutable.
$ sqlite3 ~/.local/share/zeitgeist/activity.sqlite
sqlite> delete from event;
$ sudo chattr +i ~/.local/share/zeitgeist/activity.sqlite