How do I delete just the old history (2013) and leave the rest
I need to delete all my ancient history, but not the recent. Can't find any way to select by date.
Win 7 Home Premium
Ninian
All Replies (4)
Are you talking about the internet browsing history or some other history?
You can look at this extension:
- Expire history by days: https://addons.mozilla.org/firefox/addon/expire-history-by-days/
After I installed the add-on, started having lots of problems with FF. So, had to remove it. Couldn't tell whether or not it actually did anything, looks like all the ancient history is still there.
What kind of problems did you get after installing the extension?
You can try to remove the history manually in the History Manager by doing a search for a colon.
How many history items do you have to remove?
If you only want to do this once or occasionally then you can consider to use this code:
You will have to calculate the number of days that you want to keep to remove only history items from 2013 and older (365+31+28+26)
You can open the Browser Console (Firefox/Tools > Web Developer). Paste the JavaScript code in the command line and press the Enter key to run the code.
- Toggle the devtools.chrome.enabled pref on the about:config page to true to enable the command line
- https://developer.mozilla.org/Tools/Browser_Console#Browser_Console_command_line
(function(){ /* expire history by days, based upon bug 660646 comment 5/7 - dickvl@kb.mozillazine.org */ var Cc = Components.classes, Ci = Components.interfaces; var his = Cc["@mozilla.org/browser/nav-history-service;1"].getService(Ci.nsIBrowserHistory); var prs = Cc["@mozilla.org/embedcomp/prompt-service;1"].getService(Ci.nsIPromptService); var day = 0, obj = new Object, txt = "Expire History"; obj.value = "90"; if (prs.prompt(null,txt,"Days of history to keep",obj,null,{})){ day = parseInt(obj.value); if(!isNaN(day)&&(day>0)){ his.removeVisitsByTimeframe(0,(new Date().setHours(0,0,0,0) - day * 86400000) * 1000); }else{ prs.alert(null,txt,"Error Parsing Days: "+obj.value); } } })();
If hat doesn't work then you may have a problem with the places.sqlite database file and you may have to reset places.sqlite.
- Places Maintenance: https://addons.mozilla.org/firefox/addon/places-maintenance/
You can move (copy/paste) history items that you want to keep to a bookmarks folder. See also:
- Norwell History Tools: https://addons.mozilla.org/firefox/addon/norwell/