13

In Opera you can simply type in opera:webdatabases in the address field and delete all the web SQL databases stored on your computer.

How do you do the same in Firefox? I need to delete an IndexedDB on my localhost to experiment with a fresh version.

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
Aadit Shah
  • 181
  • 1
  • 1
  • 5

9 Answers9

11

I know this is old, but there is a way to do this in Firefox:

  1. Go to Tools -> Page Info
  2. Go to the "Permissions" tab
  3. Scroll down to "Maintain Offline Storage"
  4. Click "Clear Storage"
Don Rhummy
  • 24,730
  • 42
  • 175
  • 330
5

I figured out how to delete the databases. Windows stores user data separately on a per application basis (on Windows 7 in C:\Users\\AppData). So I found the Firefox Profiles folder in this directory, went to the indexedDB folder and deleted the sqlite files. Then I restarted Firefox and it worked! The full path of Windows 7 is like: C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB

Aadit Shah
  • 181
  • 1
  • 1
  • 5
4

I have found that running this code in console (Ctrl+Shift+K) is an easier solution:

indexedDB.deleteDatabase('MyDatabaseName').onsuccess=(function(e){console.log("Delete OK");})
Dmitry Shintyakov
  • 1,664
  • 1
  • 11
  • 12
2

Here is a node script that deletes the indexedDB directory for every website.

C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB

based on Aadit's answer.

    var userName = "myWindowsUserName";

var fs = require("fs");
var root = "C:\\Users\\" + userName + "\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\";
var dir = fs.readdirSync(root);

var deleteFolderRecursive = function (path) { // http://www.geedew.com/2012/10/24/remove-a-directory-that-is-not-empty-in-nodejs/
    if (fs.existsSync(path)) {
        fs.readdirSync(path).forEach(function (file, index) {
            var curPath = path + "/" + file;
            if (fs.statSync(curPath).isDirectory()) { // recurse
                deleteFolderRecursive(curPath);
            } else { // delete file
                fs.unlinkSync(curPath);
            }
        });
        fs.rmdirSync(path);
    }
};

var anyRemoved = false;
for(var i = 0; i < dir.length; i++) {
  if(/\.default$/.test(dir[i])) {
    var idbPath = root + dir[i] + "\\indexedDB";
    var idbDir = fs.readdirSync(idbPath);
    for (var i2 = 0; i2 < idbDir.length; i2++) {
        anyRemoved = true;
        var rmDir = idbPath + "\\" + idbDir[i2];
        console.log("removing: " + rmDir);
        deleteFolderRecursive(rmDir);
    }
  }
}
if(anyRemoved === false)
  console.log("No indexedDB files were found.");

setTimeout(function () { }, 1000 * 5);
2

Firefox indexedDB (Ubuntu)

~/.mozilla/firefox-trunk/*.default/storage/persistent/<folder_to_delete>

This works for me.

paolooo
  • 4,133
  • 2
  • 18
  • 33
1

On Ubuntu and probably most linux distros it's in your home directory

~/.mozilla/firefox/<*>.default/indexedDB
mbaynton
  • 411
  • 4
  • 4
1

In firefox, indexeddb can be deleted by:

  1. Using Ctrl + Shift (Alt) + Delete and choosing to clear offline website data.
  2. Deleting the file corresponding to individual websites. On linux, these files can be found at ~/.mozilla/firefox/<profile>.default/storage/persistent/<website>
Milo
  • 3,365
  • 9
  • 30
  • 44
Ashish
  • 31
  • 2
1

On OS X 10.10.2 and Firefox 36.0.1, I deleted

~/Library/Application Support/Firefox/Profiles/*.default/storage/default/<url>/idb
psalaets
  • 707
  • 3
  • 9
0

It appears to have been moved down a directory or two. Instead of

C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\indexedDB

try

C:\Users\\AppData\Roaming\Mozilla\Firefox\Profiles\<*>.default\storage\persistent\<site>
Greg
  • 75
  • 1
  • 5