How to remove indexedDB?

I am working on a project that involves the use of IndexedDB. As I begin to get acquainted with this technology, I need to be able to remove indexedDB manually so that I can start all over again.

I found a way to do this in Firefox, but I can’t find a way for Google Chrome.

I tried deleting the contents of this folder (I am using a Mac):

{home}/Library/Application Support/Google/Chrome/Default/IndexedDB

but it seems like Chrome still has a database, so I can't start over.

+86
html5 google-chrome indexeddb
Feb 21 '12 at 19:48
source share
16 answers

In theory, all you have to do to remove IndexedDB in Chrome is:

  • In Chrome, go to Options> Under the Hood> Content Settings> Cookies and Site Data> find the domain in which you created IndexedDB
  • Click either “X” or click “Indexed Database”> “Delete”

On Windows, the file is located here:

%USERPROFILE%\AppData\Local\Google\Chrome\User Data\Default\IndexedDB

On a Mac, follow these steps:

  • In Chrome, go to "Settings" (or "Settings" in the Chrome menu).
  • Click "show advanced settings" (at the bottom of the page).
  • Go to "Privacy"> "Content Settings"> "All Cookies and Site Data"> find the domain in which you created IndexedDB
  • Click either “X” or click “Indexed Database”> “Delete”

On Mac, the folder is here:

 /Users/[USERNAME]/Library/Application Support/Google/Chrome/Default/IndexedDB/ 

On Linux, the folder is located at:

 /home/[USERNAME]/.config/google-chrome/Default/IndexedDB/ 
+97
Feb 22 2018-12-22T00:
source share

I had success in Chrome:

 indexedDB.deleteDatabase('DB NAME') 
+153
Feb 23 '13 at 21:37
source share

Alternarive is to do this in the developer console using the following command:

 indexedDB.deleteDatabase("databaseName") 
+28
Feb 25 '13 at 10:40
source share

In the Chrome web browser, you can use webkitGetDatabaseNames , which returns all the database names

With this code, you can remove all local indexedDB:

 window.indexedDB.webkitGetDatabaseNames().onsuccess = function(sender,args) { var r = sender.target.result; for(var i in r) indexedDB.deleteDatabase(r[i]); }; 
+10
May 09 '15 at 8:14
source share

To delete all Chrome IndexedDB databases, run the following in the OSX terminal emulator.

 rm -rf ${HOME}/Library/Application\ Support/Google/Chrome/Default/IndexedDB/* 

Now restart your browser and it.




Since I need to clean my IndexedDB databases very often, I set an alias in my ~. / Bash_profile file.

 alias purge-idb="rm -rf ${HOME}/Library/Application\ Support/Google/Chrome/Default/IndexedDB/*" 
+5
Feb 09 '14 at 11:21
source share

To remove IndexedDB from OS X Chrome:

1) In the "Settings" section, click "Advanced Settings", then click the "Content Settings" button in the "Privacy" section.

2) In the "Content Settings" drop-down list, click the "All cookies and site data" button in the "Cookies" section.

3) In the "Cookies and site data" pop-up window, use the "Search Cookies" text box to find the domain that is the source of IndexedDB.

4) Click on the domain entry in the list.

5) Click on the "indexed database" tag specified in the domain.

6) Click the "Delete" button in the drop-down list for the indexed database.

+3
Dec 17
source share

It is not possible to delete the IndexedDB database (unlike stores and indexes) programmatically.

Regarding manual workarounds, this post details the location of the database on Windows systems for Firefox and Chrome.

Update: Thanks to developer Joshua Bell, Chrome implements the non-specific (but insanely useful) deleteDatabase method for the deleteDatabase object. Here is the crbug that landed on this patch. Moreover, in new versions of IE you can delete databases through the settings panel .

+2
Mar 20 2018-12-12T00:
source share

Debian GNU / Linux Directory

/ home / [username] /. Config / Google-chrome / Default / IndexedDB / chrome xxx.indexeddb.leveldb /

contains regular files (for example):

000003.log, CURRENT, LOCK, LOG, MANIFEST-000002

+2
Feb 06 '13 at 23:20
source share

The Chrome developer tools now have the ability to delete all databases for the application in the "Application / Clear Storage" section.

+2
Sep 23 '17 at 22:53 on
source share

Chrome → Inspector window → Application → see the menu on the left → Storage → IndexedDB

+2
Dec 04 '17 at 15:44
source share

write this code segment in the console

window.indexedDB.deleteDatabase(<your db name>)

+1
Mar 04 '17 at 7:43 on
source share

Alternatively, use your web application in a new incognito window and close it when you're done: the database has been deleted.

0
Sep 13
source share

On Chrome OSX- / Users / User / Library / Application Support / Google / Chrome / Default / IndexedDB Firefox OSX - Users / User / Library / Application Support / Firefox / Profiles / 4zaemxcn.default / indexedDB

You just need to make the library folder visible. All files are stored in folders (called the domain name), and the files use a hash, but you can determine the database name from it. You can delete data from the IDB, as it is a client-side database, and all data is stored locally.

0
Dec 19 '12 at 1:00
source share

On Windows, you can manually delete all IndexedDB databases by specifying the IndexedDB directory for the browser and deleting it

For Chrome:

C: \ Users \ user-name \ AppData \ Local \ Google \ Chrome \ User Data \ Profile 1 \ IndexedDB

You can delete every folder that clears indexedDB. You can start all over again.

0
Sep 17 '14 at 6:54
source share

This may be redundant for your specific question, but I continued here in my struggle to remove my idb.

My solution, after all, was based on Mozilla documentation , but required me to close the database first.

For me in Javascript, the code looked like this:

 my_db_instance.close(function(e){console.log(e)}); var DBDeleteRequest = indexedDB.deleteDatabase("my_db_name"); // When i had the base open, the closure was blocked, so i left this here DBDeleteRequest.onblocked = function(event) { console.log("Blocked"); }; DBDeleteRequest.onerror = function(event) { console.log("Error deleting database."); console.log(event); }; DBDeleteRequest.onsuccess = function(event) { console.log("Database deleted successfully"); }; 
0
Aug 6 '18 at 13:14
source share

I needed to get rid of indexedDB in Chrome. Therefore, I am looking for this lousy thing called "email assistant" on my computer using MasterSeeker. Found a thing on the heap of folders that were indexed by the database in Chrome. It seemed too easy that I just deleted these files. I looked like I ended up here. I went over to the Chrome settings on my Windows 10 computer. I just tried to clear the browsing data. Presto - all of these files disappeared from indexedDB, including this terrible crap email. Now, when I look at the indexedDB folder, all I see again is https_mail.google.com_0.indexeddb.leveldb - which looks like a safe thing without any annoyance.

0
Jun 09 '19 at 1:07 on
source share



All Articles