How can I delete everything in my Firefox history older than N days?
I set FireFox to store my history for 90 days, and I think this is slowing down the AwesomeBar. I set it to store history for 45 days, but I don't know how to delete everything in my existing history older than 45 days.
firefox
add a comment |
I set FireFox to store my history for 90 days, and I think this is slowing down the AwesomeBar. I set it to store history for 45 days, but I don't know how to delete everything in my existing history older than 45 days.
firefox
add a comment |
I set FireFox to store my history for 90 days, and I think this is slowing down the AwesomeBar. I set it to store history for 45 days, but I don't know how to delete everything in my existing history older than 45 days.
firefox
I set FireFox to store my history for 90 days, and I think this is slowing down the AwesomeBar. I set it to store history for 45 days, but I don't know how to delete everything in my existing history older than 45 days.
firefox
firefox
edited Dec 10 '10 at 16:21
Peter Mortensen
8,376166185
8,376166185
asked Jul 30 '09 at 16:08
Tom LehmanTom Lehman
2931811
2931811
add a comment |
add a comment |
7 Answers
7
active
oldest
votes
The long alternative from Use Linux Now:
Trimming your Firefox History
As a follow up to my previous post about how you can significantly speed up Firefox 3 by clearing your history log, here are some tips and tricks for people who, like me, do not want to vanquish their entire history log in one fell swoop.
One of the most useful and compelling reason to always keep a reasonable amount of history logged is because it powers your awesome bar. Every time you type a url into the bar Firefox searches your history to come up with a list of suggestions you can pick. In other words, clearing your history log means your awesome bar is gonna be pretty helpless for awhile.
However, the key thing to realize when trimming your history log is that Firefox chronicles EVERY nook and cranny of the web you so much as plant a toe on. This includes all your google searches, all your video searches, every image you open in your google image searches and every last email you ever read. You should be realizing by now that unless you are a very peculiar and hardcore user, there are at least SOME of all that junk that you will never need nor want to appear on your awesome bar. In other words, we can ditch some of those history without any noticeable penalty. So the next question is naturally : how do we isolate the parts of our history log that we don’t need?
This is a sticky problem of course, and how well you can do this depends on your own surfing habits. Fortunately Firefox 3 also comes packaged with a secret weapon - the awesome Firefox 3 library manager. This is a nifty tool shipped with Firefox 3 that lets you manage your browsing history and your bookmarks in a single, powerful interface. For our purposes, you can start it up either by hitting ‘Shift-Ctrl-H‘ or going to ‘History > Show All History‘.
Smart trimming with the Firefox library manager
So what is the use of this library manager? Well, among other things this tool has a reasonably powerful search function built in (see the textbox near the top?). With this search function and a little thought on our part, we can easily isolate certain types of history items and delete them off in one fell swoop. For example, if you want to delete all your google searches (I don’t personally find them useful anyway), you can type ‘google search?’ into the search form. What the manager does then is list every history item in your log which has both the keywords ‘google’ and ’search?’ in its url or title. This happens to correspond to the url structure of all google searches (and next to nothing else), so you should see all your google searches decked out like this :
Isolating all logged google searches
To delete all your google searches then, simply select all (ctrl-A) and hit delete. If you have alot of history stored, this may lag and take awhile. After that you’re done! You have just deleted hundreds of useless history entries (if you use google as often as me)!
In a similar manner you can delete off many different classes of history items, depending on which you consider to be useless. The trick is to identify some sort of recurring pattern (in title or in url) that can distinguish the type of history items you want to delete. Sometimes this is easy : for example if you want to delete all logs of you reading your gmail emails (which I personally think is utterly useless), you can simply search for “mail.google.com/mail” and et voila!
Isolating your email reading logs
Sometimes of course it may be a little more tricky. Here are some suggested keywords you can try:
- live mail to isolate all hotmail emails and pages.
- .jpg to isolate all jpg images you opened. Similarly you can do .gif for gif images and .png for pngs.
- youtube watch? to isolate all youtube videos you’ve watched.
- Turns out that whenever you click a search result in Google, Google opens an intermediate page before bringing you to your intended destination, and Firefox of course faithfully chronicles this obviously useless intermediate page. Fortunately these pages are easy to isolate. Search google url?.
What kind of junk accumulates most in your history log depends highly on your surfing habits, of course. You can get a clue of what sort of pages are occupying large portions of your history log by simply sorting the log according to the Location column. To do this, simply click on the ‘Location‘ column header.
Sort by Location for clues of what is occupying large portions of your history log.
Limiting the amount of history Firefox keeps
I mentioned in my earlier post that Firefox has a setting at Edit > Preferences > Privacy - “Keep my history for at least XX days”. It turns out that this is a ’soft’ limit and does not mean that your history will be deleted after XX days. We can set a ‘hard’ limit by messing abit with the Firefox config. To do this :
- type ‘about:config‘ in your address bar. You should receive a very appropriate warning message about what we’re going to do, to which you should go ahead and promise to be careful. On agreeing you should see a dizzying array of config parameters displayed. Fortunately we are only interested in a few of them.
- Type ‘history‘ in the filter box, and double-click ‘browser.history_expire_days‘ when it shows up.
- Key in the amount of days you would like your history to be kept.
Voila! We’re done. Firefox will now delete any history item that has not been accessed in that amount of days. You can also set a hard limit on the total amount of history items to keep by changing the value of ‘browser.history_expire_sites‘.
A more advanced alternative
It turns out that in Firefox 3, all history items (and bookmarks) are stored in SQLite databases. So people who are well versed in SQL and would like to perform more powerful queries to selectively delete your history items can try out this neat Firefox add-on called SQLite manager. IT functions as a GUI SQLite database manager much like PhpMyAdmin does for MySQL. To get to the appropriate database, simply launch the add-on (Tools > SQLite Manager), and select “places.sqlite” from the top-right drop-down list. Query as pleased from there The interface is pretty idiot proof.
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
|
show 2 more comments
In command line, you can try the following code in a bash
shell with sqlite3
command :
(you need bash & cygwin if you use Windows, or search the same tools in Windows)
date +%s -d "1 month ago" # the date, one month ago
1329352723
$ sqlite3 ~/mozilla/.firefox/*default/places.sqlite
sqlite> delete from moz_places
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite> delete from moz_historyvisits
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite>
Please, first backup your profile in case. ;)
add a comment |
"Today" option means delete history of current calendar day. Not last 24 hours.
For instance,
you visit youtube at 23:50 o'clock and now 23:55.
Open history -> Today -> you will see youtube.
After that you visit superuser at 00:05 o'clock and now 00:15 already.
Open history -> Today -> you will see only superuser but open history -> Yesterday -> you will see youtube.
So if you chose Clear recent history in Firefox -> Today -> you will delete only superuser but youtube stayed.
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
add a comment |
You can try out the Expire history by days extension.
add a comment |
If you have SQLite you can run this command:
echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite
add a comment |
Just wait 24 hours! or you could close the browser (without saving tabs to cache (bookmark all tabs if required)) and then open it and and see if that worked.
add a comment |
The following fast bash script has been working well on my OS X 10.6.8 after I updated /usr/bin/sqlite3. Hopefully it will work on most versions of OS X and Linux.
d=30; # Number of days of history to keep
find ~ ( -ipath *Mozilla/Firefox*/places.sqlite -or -ipath *Support/Firefox*/places.sqlite ) > ~/.firefox-places;
x="$(<~/.firefox-places)"; # List of locations of Firefox places.sqlite - may not use 'find' every time in future
cd "${x%%places.sqlite*}"; # For the time being select only the first places.sqlite location - may change later
t=$(date -v-"$d"d +%s)000000; # Fast Moz compatible time for 'd' days ago - note the 'multiply' by 1,000,000
sudo echo "delete from moz_historyvisits where visit_date < $t; vacuum;" | sqlite3 places.sqlite;
Please don't wrap the above script to improve the display here.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f15794%2fhow-can-i-delete-everything-in-my-firefox-history-older-than-n-days%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
The long alternative from Use Linux Now:
Trimming your Firefox History
As a follow up to my previous post about how you can significantly speed up Firefox 3 by clearing your history log, here are some tips and tricks for people who, like me, do not want to vanquish their entire history log in one fell swoop.
One of the most useful and compelling reason to always keep a reasonable amount of history logged is because it powers your awesome bar. Every time you type a url into the bar Firefox searches your history to come up with a list of suggestions you can pick. In other words, clearing your history log means your awesome bar is gonna be pretty helpless for awhile.
However, the key thing to realize when trimming your history log is that Firefox chronicles EVERY nook and cranny of the web you so much as plant a toe on. This includes all your google searches, all your video searches, every image you open in your google image searches and every last email you ever read. You should be realizing by now that unless you are a very peculiar and hardcore user, there are at least SOME of all that junk that you will never need nor want to appear on your awesome bar. In other words, we can ditch some of those history without any noticeable penalty. So the next question is naturally : how do we isolate the parts of our history log that we don’t need?
This is a sticky problem of course, and how well you can do this depends on your own surfing habits. Fortunately Firefox 3 also comes packaged with a secret weapon - the awesome Firefox 3 library manager. This is a nifty tool shipped with Firefox 3 that lets you manage your browsing history and your bookmarks in a single, powerful interface. For our purposes, you can start it up either by hitting ‘Shift-Ctrl-H‘ or going to ‘History > Show All History‘.
Smart trimming with the Firefox library manager
So what is the use of this library manager? Well, among other things this tool has a reasonably powerful search function built in (see the textbox near the top?). With this search function and a little thought on our part, we can easily isolate certain types of history items and delete them off in one fell swoop. For example, if you want to delete all your google searches (I don’t personally find them useful anyway), you can type ‘google search?’ into the search form. What the manager does then is list every history item in your log which has both the keywords ‘google’ and ’search?’ in its url or title. This happens to correspond to the url structure of all google searches (and next to nothing else), so you should see all your google searches decked out like this :
Isolating all logged google searches
To delete all your google searches then, simply select all (ctrl-A) and hit delete. If you have alot of history stored, this may lag and take awhile. After that you’re done! You have just deleted hundreds of useless history entries (if you use google as often as me)!
In a similar manner you can delete off many different classes of history items, depending on which you consider to be useless. The trick is to identify some sort of recurring pattern (in title or in url) that can distinguish the type of history items you want to delete. Sometimes this is easy : for example if you want to delete all logs of you reading your gmail emails (which I personally think is utterly useless), you can simply search for “mail.google.com/mail” and et voila!
Isolating your email reading logs
Sometimes of course it may be a little more tricky. Here are some suggested keywords you can try:
- live mail to isolate all hotmail emails and pages.
- .jpg to isolate all jpg images you opened. Similarly you can do .gif for gif images and .png for pngs.
- youtube watch? to isolate all youtube videos you’ve watched.
- Turns out that whenever you click a search result in Google, Google opens an intermediate page before bringing you to your intended destination, and Firefox of course faithfully chronicles this obviously useless intermediate page. Fortunately these pages are easy to isolate. Search google url?.
What kind of junk accumulates most in your history log depends highly on your surfing habits, of course. You can get a clue of what sort of pages are occupying large portions of your history log by simply sorting the log according to the Location column. To do this, simply click on the ‘Location‘ column header.
Sort by Location for clues of what is occupying large portions of your history log.
Limiting the amount of history Firefox keeps
I mentioned in my earlier post that Firefox has a setting at Edit > Preferences > Privacy - “Keep my history for at least XX days”. It turns out that this is a ’soft’ limit and does not mean that your history will be deleted after XX days. We can set a ‘hard’ limit by messing abit with the Firefox config. To do this :
- type ‘about:config‘ in your address bar. You should receive a very appropriate warning message about what we’re going to do, to which you should go ahead and promise to be careful. On agreeing you should see a dizzying array of config parameters displayed. Fortunately we are only interested in a few of them.
- Type ‘history‘ in the filter box, and double-click ‘browser.history_expire_days‘ when it shows up.
- Key in the amount of days you would like your history to be kept.
Voila! We’re done. Firefox will now delete any history item that has not been accessed in that amount of days. You can also set a hard limit on the total amount of history items to keep by changing the value of ‘browser.history_expire_sites‘.
A more advanced alternative
It turns out that in Firefox 3, all history items (and bookmarks) are stored in SQLite databases. So people who are well versed in SQL and would like to perform more powerful queries to selectively delete your history items can try out this neat Firefox add-on called SQLite manager. IT functions as a GUI SQLite database manager much like PhpMyAdmin does for MySQL. To get to the appropriate database, simply launch the add-on (Tools > SQLite Manager), and select “places.sqlite” from the top-right drop-down list. Query as pleased from there The interface is pretty idiot proof.
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
|
show 2 more comments
The long alternative from Use Linux Now:
Trimming your Firefox History
As a follow up to my previous post about how you can significantly speed up Firefox 3 by clearing your history log, here are some tips and tricks for people who, like me, do not want to vanquish their entire history log in one fell swoop.
One of the most useful and compelling reason to always keep a reasonable amount of history logged is because it powers your awesome bar. Every time you type a url into the bar Firefox searches your history to come up with a list of suggestions you can pick. In other words, clearing your history log means your awesome bar is gonna be pretty helpless for awhile.
However, the key thing to realize when trimming your history log is that Firefox chronicles EVERY nook and cranny of the web you so much as plant a toe on. This includes all your google searches, all your video searches, every image you open in your google image searches and every last email you ever read. You should be realizing by now that unless you are a very peculiar and hardcore user, there are at least SOME of all that junk that you will never need nor want to appear on your awesome bar. In other words, we can ditch some of those history without any noticeable penalty. So the next question is naturally : how do we isolate the parts of our history log that we don’t need?
This is a sticky problem of course, and how well you can do this depends on your own surfing habits. Fortunately Firefox 3 also comes packaged with a secret weapon - the awesome Firefox 3 library manager. This is a nifty tool shipped with Firefox 3 that lets you manage your browsing history and your bookmarks in a single, powerful interface. For our purposes, you can start it up either by hitting ‘Shift-Ctrl-H‘ or going to ‘History > Show All History‘.
Smart trimming with the Firefox library manager
So what is the use of this library manager? Well, among other things this tool has a reasonably powerful search function built in (see the textbox near the top?). With this search function and a little thought on our part, we can easily isolate certain types of history items and delete them off in one fell swoop. For example, if you want to delete all your google searches (I don’t personally find them useful anyway), you can type ‘google search?’ into the search form. What the manager does then is list every history item in your log which has both the keywords ‘google’ and ’search?’ in its url or title. This happens to correspond to the url structure of all google searches (and next to nothing else), so you should see all your google searches decked out like this :
Isolating all logged google searches
To delete all your google searches then, simply select all (ctrl-A) and hit delete. If you have alot of history stored, this may lag and take awhile. After that you’re done! You have just deleted hundreds of useless history entries (if you use google as often as me)!
In a similar manner you can delete off many different classes of history items, depending on which you consider to be useless. The trick is to identify some sort of recurring pattern (in title or in url) that can distinguish the type of history items you want to delete. Sometimes this is easy : for example if you want to delete all logs of you reading your gmail emails (which I personally think is utterly useless), you can simply search for “mail.google.com/mail” and et voila!
Isolating your email reading logs
Sometimes of course it may be a little more tricky. Here are some suggested keywords you can try:
- live mail to isolate all hotmail emails and pages.
- .jpg to isolate all jpg images you opened. Similarly you can do .gif for gif images and .png for pngs.
- youtube watch? to isolate all youtube videos you’ve watched.
- Turns out that whenever you click a search result in Google, Google opens an intermediate page before bringing you to your intended destination, and Firefox of course faithfully chronicles this obviously useless intermediate page. Fortunately these pages are easy to isolate. Search google url?.
What kind of junk accumulates most in your history log depends highly on your surfing habits, of course. You can get a clue of what sort of pages are occupying large portions of your history log by simply sorting the log according to the Location column. To do this, simply click on the ‘Location‘ column header.
Sort by Location for clues of what is occupying large portions of your history log.
Limiting the amount of history Firefox keeps
I mentioned in my earlier post that Firefox has a setting at Edit > Preferences > Privacy - “Keep my history for at least XX days”. It turns out that this is a ’soft’ limit and does not mean that your history will be deleted after XX days. We can set a ‘hard’ limit by messing abit with the Firefox config. To do this :
- type ‘about:config‘ in your address bar. You should receive a very appropriate warning message about what we’re going to do, to which you should go ahead and promise to be careful. On agreeing you should see a dizzying array of config parameters displayed. Fortunately we are only interested in a few of them.
- Type ‘history‘ in the filter box, and double-click ‘browser.history_expire_days‘ when it shows up.
- Key in the amount of days you would like your history to be kept.
Voila! We’re done. Firefox will now delete any history item that has not been accessed in that amount of days. You can also set a hard limit on the total amount of history items to keep by changing the value of ‘browser.history_expire_sites‘.
A more advanced alternative
It turns out that in Firefox 3, all history items (and bookmarks) are stored in SQLite databases. So people who are well versed in SQL and would like to perform more powerful queries to selectively delete your history items can try out this neat Firefox add-on called SQLite manager. IT functions as a GUI SQLite database manager much like PhpMyAdmin does for MySQL. To get to the appropriate database, simply launch the add-on (Tools > SQLite Manager), and select “places.sqlite” from the top-right drop-down list. Query as pleased from there The interface is pretty idiot proof.
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
|
show 2 more comments
The long alternative from Use Linux Now:
Trimming your Firefox History
As a follow up to my previous post about how you can significantly speed up Firefox 3 by clearing your history log, here are some tips and tricks for people who, like me, do not want to vanquish their entire history log in one fell swoop.
One of the most useful and compelling reason to always keep a reasonable amount of history logged is because it powers your awesome bar. Every time you type a url into the bar Firefox searches your history to come up with a list of suggestions you can pick. In other words, clearing your history log means your awesome bar is gonna be pretty helpless for awhile.
However, the key thing to realize when trimming your history log is that Firefox chronicles EVERY nook and cranny of the web you so much as plant a toe on. This includes all your google searches, all your video searches, every image you open in your google image searches and every last email you ever read. You should be realizing by now that unless you are a very peculiar and hardcore user, there are at least SOME of all that junk that you will never need nor want to appear on your awesome bar. In other words, we can ditch some of those history without any noticeable penalty. So the next question is naturally : how do we isolate the parts of our history log that we don’t need?
This is a sticky problem of course, and how well you can do this depends on your own surfing habits. Fortunately Firefox 3 also comes packaged with a secret weapon - the awesome Firefox 3 library manager. This is a nifty tool shipped with Firefox 3 that lets you manage your browsing history and your bookmarks in a single, powerful interface. For our purposes, you can start it up either by hitting ‘Shift-Ctrl-H‘ or going to ‘History > Show All History‘.
Smart trimming with the Firefox library manager
So what is the use of this library manager? Well, among other things this tool has a reasonably powerful search function built in (see the textbox near the top?). With this search function and a little thought on our part, we can easily isolate certain types of history items and delete them off in one fell swoop. For example, if you want to delete all your google searches (I don’t personally find them useful anyway), you can type ‘google search?’ into the search form. What the manager does then is list every history item in your log which has both the keywords ‘google’ and ’search?’ in its url or title. This happens to correspond to the url structure of all google searches (and next to nothing else), so you should see all your google searches decked out like this :
Isolating all logged google searches
To delete all your google searches then, simply select all (ctrl-A) and hit delete. If you have alot of history stored, this may lag and take awhile. After that you’re done! You have just deleted hundreds of useless history entries (if you use google as often as me)!
In a similar manner you can delete off many different classes of history items, depending on which you consider to be useless. The trick is to identify some sort of recurring pattern (in title or in url) that can distinguish the type of history items you want to delete. Sometimes this is easy : for example if you want to delete all logs of you reading your gmail emails (which I personally think is utterly useless), you can simply search for “mail.google.com/mail” and et voila!
Isolating your email reading logs
Sometimes of course it may be a little more tricky. Here are some suggested keywords you can try:
- live mail to isolate all hotmail emails and pages.
- .jpg to isolate all jpg images you opened. Similarly you can do .gif for gif images and .png for pngs.
- youtube watch? to isolate all youtube videos you’ve watched.
- Turns out that whenever you click a search result in Google, Google opens an intermediate page before bringing you to your intended destination, and Firefox of course faithfully chronicles this obviously useless intermediate page. Fortunately these pages are easy to isolate. Search google url?.
What kind of junk accumulates most in your history log depends highly on your surfing habits, of course. You can get a clue of what sort of pages are occupying large portions of your history log by simply sorting the log according to the Location column. To do this, simply click on the ‘Location‘ column header.
Sort by Location for clues of what is occupying large portions of your history log.
Limiting the amount of history Firefox keeps
I mentioned in my earlier post that Firefox has a setting at Edit > Preferences > Privacy - “Keep my history for at least XX days”. It turns out that this is a ’soft’ limit and does not mean that your history will be deleted after XX days. We can set a ‘hard’ limit by messing abit with the Firefox config. To do this :
- type ‘about:config‘ in your address bar. You should receive a very appropriate warning message about what we’re going to do, to which you should go ahead and promise to be careful. On agreeing you should see a dizzying array of config parameters displayed. Fortunately we are only interested in a few of them.
- Type ‘history‘ in the filter box, and double-click ‘browser.history_expire_days‘ when it shows up.
- Key in the amount of days you would like your history to be kept.
Voila! We’re done. Firefox will now delete any history item that has not been accessed in that amount of days. You can also set a hard limit on the total amount of history items to keep by changing the value of ‘browser.history_expire_sites‘.
A more advanced alternative
It turns out that in Firefox 3, all history items (and bookmarks) are stored in SQLite databases. So people who are well versed in SQL and would like to perform more powerful queries to selectively delete your history items can try out this neat Firefox add-on called SQLite manager. IT functions as a GUI SQLite database manager much like PhpMyAdmin does for MySQL. To get to the appropriate database, simply launch the add-on (Tools > SQLite Manager), and select “places.sqlite” from the top-right drop-down list. Query as pleased from there The interface is pretty idiot proof.
The long alternative from Use Linux Now:
Trimming your Firefox History
As a follow up to my previous post about how you can significantly speed up Firefox 3 by clearing your history log, here are some tips and tricks for people who, like me, do not want to vanquish their entire history log in one fell swoop.
One of the most useful and compelling reason to always keep a reasonable amount of history logged is because it powers your awesome bar. Every time you type a url into the bar Firefox searches your history to come up with a list of suggestions you can pick. In other words, clearing your history log means your awesome bar is gonna be pretty helpless for awhile.
However, the key thing to realize when trimming your history log is that Firefox chronicles EVERY nook and cranny of the web you so much as plant a toe on. This includes all your google searches, all your video searches, every image you open in your google image searches and every last email you ever read. You should be realizing by now that unless you are a very peculiar and hardcore user, there are at least SOME of all that junk that you will never need nor want to appear on your awesome bar. In other words, we can ditch some of those history without any noticeable penalty. So the next question is naturally : how do we isolate the parts of our history log that we don’t need?
This is a sticky problem of course, and how well you can do this depends on your own surfing habits. Fortunately Firefox 3 also comes packaged with a secret weapon - the awesome Firefox 3 library manager. This is a nifty tool shipped with Firefox 3 that lets you manage your browsing history and your bookmarks in a single, powerful interface. For our purposes, you can start it up either by hitting ‘Shift-Ctrl-H‘ or going to ‘History > Show All History‘.
Smart trimming with the Firefox library manager
So what is the use of this library manager? Well, among other things this tool has a reasonably powerful search function built in (see the textbox near the top?). With this search function and a little thought on our part, we can easily isolate certain types of history items and delete them off in one fell swoop. For example, if you want to delete all your google searches (I don’t personally find them useful anyway), you can type ‘google search?’ into the search form. What the manager does then is list every history item in your log which has both the keywords ‘google’ and ’search?’ in its url or title. This happens to correspond to the url structure of all google searches (and next to nothing else), so you should see all your google searches decked out like this :
Isolating all logged google searches
To delete all your google searches then, simply select all (ctrl-A) and hit delete. If you have alot of history stored, this may lag and take awhile. After that you’re done! You have just deleted hundreds of useless history entries (if you use google as often as me)!
In a similar manner you can delete off many different classes of history items, depending on which you consider to be useless. The trick is to identify some sort of recurring pattern (in title or in url) that can distinguish the type of history items you want to delete. Sometimes this is easy : for example if you want to delete all logs of you reading your gmail emails (which I personally think is utterly useless), you can simply search for “mail.google.com/mail” and et voila!
Isolating your email reading logs
Sometimes of course it may be a little more tricky. Here are some suggested keywords you can try:
- live mail to isolate all hotmail emails and pages.
- .jpg to isolate all jpg images you opened. Similarly you can do .gif for gif images and .png for pngs.
- youtube watch? to isolate all youtube videos you’ve watched.
- Turns out that whenever you click a search result in Google, Google opens an intermediate page before bringing you to your intended destination, and Firefox of course faithfully chronicles this obviously useless intermediate page. Fortunately these pages are easy to isolate. Search google url?.
What kind of junk accumulates most in your history log depends highly on your surfing habits, of course. You can get a clue of what sort of pages are occupying large portions of your history log by simply sorting the log according to the Location column. To do this, simply click on the ‘Location‘ column header.
Sort by Location for clues of what is occupying large portions of your history log.
Limiting the amount of history Firefox keeps
I mentioned in my earlier post that Firefox has a setting at Edit > Preferences > Privacy - “Keep my history for at least XX days”. It turns out that this is a ’soft’ limit and does not mean that your history will be deleted after XX days. We can set a ‘hard’ limit by messing abit with the Firefox config. To do this :
- type ‘about:config‘ in your address bar. You should receive a very appropriate warning message about what we’re going to do, to which you should go ahead and promise to be careful. On agreeing you should see a dizzying array of config parameters displayed. Fortunately we are only interested in a few of them.
- Type ‘history‘ in the filter box, and double-click ‘browser.history_expire_days‘ when it shows up.
- Key in the amount of days you would like your history to be kept.
Voila! We’re done. Firefox will now delete any history item that has not been accessed in that amount of days. You can also set a hard limit on the total amount of history items to keep by changing the value of ‘browser.history_expire_sites‘.
A more advanced alternative
It turns out that in Firefox 3, all history items (and bookmarks) are stored in SQLite databases. So people who are well versed in SQL and would like to perform more powerful queries to selectively delete your history items can try out this neat Firefox add-on called SQLite manager. IT functions as a GUI SQLite database manager much like PhpMyAdmin does for MySQL. To get to the appropriate database, simply launch the add-on (Tools > SQLite Manager), and select “places.sqlite” from the top-right drop-down list. Query as pleased from there The interface is pretty idiot proof.
edited Aug 11 '11 at 17:00
3498DB
15.8k114862
15.8k114862
answered Jul 30 '09 at 16:10
Ivo Flipse♦Ivo Flipse
21.9k2796145
21.9k2796145
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
|
show 2 more comments
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
2
2
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
No need for CCleaner, Firefox can clean its own history if you want to just clean it all. Go to: Tools > Clear Recent History (that's the wording in FF3.5 before that it was Clear Private Data).
– Eran
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
God some people have no sense of humor!
– Ivo Flipse♦
Jul 30 '09 at 16:17
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
@Ivo : there is no tag "humour" in the question, so everyone has to answer seriously :]
– Gnoupi
Jul 30 '09 at 17:14
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
Good to see that nobody took my edit serious then...
– Ivo Flipse♦
Jul 30 '09 at 17:45
1
1
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
I don't have time to read all that, but it looks smart. +1
– theycallmemorty
Jul 30 '09 at 20:51
|
show 2 more comments
In command line, you can try the following code in a bash
shell with sqlite3
command :
(you need bash & cygwin if you use Windows, or search the same tools in Windows)
date +%s -d "1 month ago" # the date, one month ago
1329352723
$ sqlite3 ~/mozilla/.firefox/*default/places.sqlite
sqlite> delete from moz_places
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite> delete from moz_historyvisits
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite>
Please, first backup your profile in case. ;)
add a comment |
In command line, you can try the following code in a bash
shell with sqlite3
command :
(you need bash & cygwin if you use Windows, or search the same tools in Windows)
date +%s -d "1 month ago" # the date, one month ago
1329352723
$ sqlite3 ~/mozilla/.firefox/*default/places.sqlite
sqlite> delete from moz_places
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite> delete from moz_historyvisits
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite>
Please, first backup your profile in case. ;)
add a comment |
In command line, you can try the following code in a bash
shell with sqlite3
command :
(you need bash & cygwin if you use Windows, or search the same tools in Windows)
date +%s -d "1 month ago" # the date, one month ago
1329352723
$ sqlite3 ~/mozilla/.firefox/*default/places.sqlite
sqlite> delete from moz_places
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite> delete from moz_historyvisits
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite>
Please, first backup your profile in case. ;)
In command line, you can try the following code in a bash
shell with sqlite3
command :
(you need bash & cygwin if you use Windows, or search the same tools in Windows)
date +%s -d "1 month ago" # the date, one month ago
1329352723
$ sqlite3 ~/mozilla/.firefox/*default/places.sqlite
sqlite> delete from moz_places
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite> delete from moz_historyvisits
...> where id in (
...> select id from moz_historyvisits
...> where visit_date/1000000 < 1329352723
...> );
sqlite>
Please, first backup your profile in case. ;)
edited Mar 16 '12 at 2:03
answered Mar 16 '12 at 0:56
Gilles QuenotGilles Quenot
2,84111724
2,84111724
add a comment |
add a comment |
"Today" option means delete history of current calendar day. Not last 24 hours.
For instance,
you visit youtube at 23:50 o'clock and now 23:55.
Open history -> Today -> you will see youtube.
After that you visit superuser at 00:05 o'clock and now 00:15 already.
Open history -> Today -> you will see only superuser but open history -> Yesterday -> you will see youtube.
So if you chose Clear recent history in Firefox -> Today -> you will delete only superuser but youtube stayed.
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
add a comment |
"Today" option means delete history of current calendar day. Not last 24 hours.
For instance,
you visit youtube at 23:50 o'clock and now 23:55.
Open history -> Today -> you will see youtube.
After that you visit superuser at 00:05 o'clock and now 00:15 already.
Open history -> Today -> you will see only superuser but open history -> Yesterday -> you will see youtube.
So if you chose Clear recent history in Firefox -> Today -> you will delete only superuser but youtube stayed.
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
add a comment |
"Today" option means delete history of current calendar day. Not last 24 hours.
For instance,
you visit youtube at 23:50 o'clock and now 23:55.
Open history -> Today -> you will see youtube.
After that you visit superuser at 00:05 o'clock and now 00:15 already.
Open history -> Today -> you will see only superuser but open history -> Yesterday -> you will see youtube.
So if you chose Clear recent history in Firefox -> Today -> you will delete only superuser but youtube stayed.
"Today" option means delete history of current calendar day. Not last 24 hours.
For instance,
you visit youtube at 23:50 o'clock and now 23:55.
Open history -> Today -> you will see youtube.
After that you visit superuser at 00:05 o'clock and now 00:15 already.
Open history -> Today -> you will see only superuser but open history -> Yesterday -> you will see youtube.
So if you chose Clear recent history in Firefox -> Today -> you will delete only superuser but youtube stayed.
answered Jul 2 '15 at 21:15
Today - 24 hours or last dayToday - 24 hours or last day
111
111
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
add a comment |
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
Welcome to Super User! While this may answer the question, it would be a better answer if you could provide some explanation why it does so.
– DavidPostill♦
Jul 2 '15 at 21:37
add a comment |
You can try out the Expire history by days extension.
add a comment |
You can try out the Expire history by days extension.
add a comment |
You can try out the Expire history by days extension.
You can try out the Expire history by days extension.
edited Dec 20 '15 at 8:46
galacticninja
3,8301363100
3,8301363100
answered Mar 16 '12 at 1:59
moulmoul
1663
1663
add a comment |
add a comment |
If you have SQLite you can run this command:
echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite
add a comment |
If you have SQLite you can run this command:
echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite
add a comment |
If you have SQLite you can run this command:
echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite
If you have SQLite you can run this command:
echo 'DELETE FROM moz_historyvisits
WHERE visit_date < strftime("%s", "now", "-5 month") * 1000000; VACUUM;' |
sqlite3 places.sqlite
edited Apr 25 '16 at 0:09
answered Apr 25 '16 at 0:02
Steven PennySteven Penny
1
1
add a comment |
add a comment |
Just wait 24 hours! or you could close the browser (without saving tabs to cache (bookmark all tabs if required)) and then open it and and see if that worked.
add a comment |
Just wait 24 hours! or you could close the browser (without saving tabs to cache (bookmark all tabs if required)) and then open it and and see if that worked.
add a comment |
Just wait 24 hours! or you could close the browser (without saving tabs to cache (bookmark all tabs if required)) and then open it and and see if that worked.
Just wait 24 hours! or you could close the browser (without saving tabs to cache (bookmark all tabs if required)) and then open it and and see if that worked.
answered Jul 30 '09 at 20:33
facepalmdfacepalmd
61931014
61931014
add a comment |
add a comment |
The following fast bash script has been working well on my OS X 10.6.8 after I updated /usr/bin/sqlite3. Hopefully it will work on most versions of OS X and Linux.
d=30; # Number of days of history to keep
find ~ ( -ipath *Mozilla/Firefox*/places.sqlite -or -ipath *Support/Firefox*/places.sqlite ) > ~/.firefox-places;
x="$(<~/.firefox-places)"; # List of locations of Firefox places.sqlite - may not use 'find' every time in future
cd "${x%%places.sqlite*}"; # For the time being select only the first places.sqlite location - may change later
t=$(date -v-"$d"d +%s)000000; # Fast Moz compatible time for 'd' days ago - note the 'multiply' by 1,000,000
sudo echo "delete from moz_historyvisits where visit_date < $t; vacuum;" | sqlite3 places.sqlite;
Please don't wrap the above script to improve the display here.
add a comment |
The following fast bash script has been working well on my OS X 10.6.8 after I updated /usr/bin/sqlite3. Hopefully it will work on most versions of OS X and Linux.
d=30; # Number of days of history to keep
find ~ ( -ipath *Mozilla/Firefox*/places.sqlite -or -ipath *Support/Firefox*/places.sqlite ) > ~/.firefox-places;
x="$(<~/.firefox-places)"; # List of locations of Firefox places.sqlite - may not use 'find' every time in future
cd "${x%%places.sqlite*}"; # For the time being select only the first places.sqlite location - may change later
t=$(date -v-"$d"d +%s)000000; # Fast Moz compatible time for 'd' days ago - note the 'multiply' by 1,000,000
sudo echo "delete from moz_historyvisits where visit_date < $t; vacuum;" | sqlite3 places.sqlite;
Please don't wrap the above script to improve the display here.
add a comment |
The following fast bash script has been working well on my OS X 10.6.8 after I updated /usr/bin/sqlite3. Hopefully it will work on most versions of OS X and Linux.
d=30; # Number of days of history to keep
find ~ ( -ipath *Mozilla/Firefox*/places.sqlite -or -ipath *Support/Firefox*/places.sqlite ) > ~/.firefox-places;
x="$(<~/.firefox-places)"; # List of locations of Firefox places.sqlite - may not use 'find' every time in future
cd "${x%%places.sqlite*}"; # For the time being select only the first places.sqlite location - may change later
t=$(date -v-"$d"d +%s)000000; # Fast Moz compatible time for 'd' days ago - note the 'multiply' by 1,000,000
sudo echo "delete from moz_historyvisits where visit_date < $t; vacuum;" | sqlite3 places.sqlite;
Please don't wrap the above script to improve the display here.
The following fast bash script has been working well on my OS X 10.6.8 after I updated /usr/bin/sqlite3. Hopefully it will work on most versions of OS X and Linux.
d=30; # Number of days of history to keep
find ~ ( -ipath *Mozilla/Firefox*/places.sqlite -or -ipath *Support/Firefox*/places.sqlite ) > ~/.firefox-places;
x="$(<~/.firefox-places)"; # List of locations of Firefox places.sqlite - may not use 'find' every time in future
cd "${x%%places.sqlite*}"; # For the time being select only the first places.sqlite location - may change later
t=$(date -v-"$d"d +%s)000000; # Fast Moz compatible time for 'd' days ago - note the 'multiply' by 1,000,000
sudo echo "delete from moz_historyvisits where visit_date < $t; vacuum;" | sqlite3 places.sqlite;
Please don't wrap the above script to improve the display here.
edited Feb 11 at 21:23
answered Feb 10 at 18:45
Neville HillyerNeville Hillyer
364
364
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f15794%2fhow-can-i-delete-everything-in-my-firefox-history-older-than-n-days%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown