Possibly related to this question: Can I view Firefox history with the terminal?
I want to create a shell script that clears everything in my Firefox's history (this includes the other histories such as cache) in order to have a clean copy to backup before installing the next Ubuntu version or just to have. The question is how to do this via command line so I can add those lines to my script.
I'm okay with a command line command via BleachBit also, if possible.
This short command cleans Firefox backups, cache, cookies, crash reports, DOM storage, download history, form history, passwords, session restore, site preferences, and URL history (as of BleachBit 1.8):
(See also BleachBit documentation: command-line)
If you want to erase the history from Firefox, use
cd
in the Terminal to where all the sqlite files are stored, following the instructions in the link you provided. The following code will erase the relevant table:This link tells you where your history.dat is located in your profile and so you can delete that.
Browsing History: history.dat
Saved Form Information: formhistory.dat
Download History: downloads.rdf
Cookies: cookies.txt
Cache: cache (& trash cache) (folders!)
To find your profile folder: Go to Help menu, Troubleshooting information. Near the top will say "Profile Folder" and a button called "Show Folder".
about:support
. Just type that in the address bar.