Linux Blog

Clear browser history from command prompt

Filed under: General Linux,Quick Linux Tutorials — TheLinuxBlog.com at 3:36 pm on Thursday, January 17, 2008

I found this link a while back on clearing the history in IE7 from the command prompt

Clear IE7 browsing history from the command line

Although not specifically Linux related it is interesting and I thought users who sometimes use IE7 may be interested in this. It also provoked me to ask the question “How do I clear FireFox history from command line.”

Well, it is a bit simpler then clearing your history in IE7. The only thing you need to know is your profile name, and even then you don’t really have to because you can guess.

Firstly there are a couple of files that you should be aware of they are: cookies.txt, downloads.rdf, history.dat and one folder full of files: <profile>/Cache/

Now to clear your downloads list, your cookies list, your history or your cache you basically just remove the corresponding file. So, lets take a look at the command. We’ll assume my randomly generated profile name is called linux-blog

owen@linux-blog:~$ rm .mozilla/firefox/linux-blog.default/cookies.txt
owen@linux-blog:~$ rm .mozilla/firefox/linux-blog.default/Cache/*
owen@linux-blog:~$ rm .mozilla/firefox/linux-blog.default/downloads.rdf
owen@linux-blog:~$ rm .mozilla/firefox/linux-blog.default/history.dat

The above need to be ran individually. Make sure that FireFox is closed before the above is ran, or some pages may not load correctly. If any one is interested I’ll write a shell script to make this easier.

Man Pages for commands in this post »

rm

1 Comment »

Comment by Art M

July 1, 2009 @ 5:40 pm

I have a huge problem cleaning my URL I use Fire Fox web browser
and I use Fedora 10. I just have install them from scratch
can you please help me how to clean up my PC.
I really like to know how to do that, I have try to use these option below:
Edit – preference – privacy
History bar I have check – the firs tree
Cookies – the first two and below (keep until expire)
Private data –
always clear my private data (UN check)
ask me before cleaning my private data (check)
Setting – I have check all of them except delete password

I hope to hear back from you very, soon.
thank you for all your help in this matter.
Art M
[oem@FreekBox ~]$ rm .mozilla/firefox/linux-blog.default/cookies.txt
rm: cannot remove `.mozilla/firefox/linux-blog.default/cookies.txt': No such file or directory
[oem@FreekBox ~]$ rm .mozilla/firefox/linux-blog.default/Cache/*
rm: cannot remove `.mozilla/firefox/linux-blog.default/Cache/*': No such file or directory
[oem@FreekBox ~]$ rm .mozilla/firefox/linux-blog.default/downloads.rdf
rm: cannot remove `.mozilla/firefox/linux-blog.default/downloads.rdf': No such file or directory
[oem@FreekBox ~]$

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>