How to delete a created firestore database.?
Asked Answered
S

7

11

I have created a firestore database in firebase. Now I no longer need that,I couldn't found any option to delete it.Is there any option ?

Sedgewinn answered 4/9, 2019 at 11:23 Comment(3)
What do you mean through "entire database to be deleted"?Hydrosol
Just like a fresh firebase project. (With Create database option)Sedgewinn
Then delete the project and create a new one.Hydrosol
D
24

There's no way option to delete Firestore in Firebase UI, neither in Google Cloud. You can remove the whole project or let it be. You won't be billed for it if you don't use it.

Duplicature answered 4/9, 2019 at 12:33 Comment(0)
S
6

You can use the CLI to delete the entire database:

firebase firestore:delete --all-collections

It will list all the collections in your Firestore and ask you for confirmation if you really want to drop everything.

Stacey answered 19/3, 2022 at 22:54 Comment(1)
Thanks for this - it deletes the content of the database, not removes the database from the google cloud nor deletes the firebase project. And this command I needed! (as importing databases via google cloud is an upsert).Markmarkdown
R
5

To delete a DB in Firestore, you can also use gcloud. For the default DB you have to use this command: gcloud alpha firestore databases delete --database='(default)'

Resurrectionism answered 16/9, 2023 at 15:55 Comment(1)
@habeeb-rahman this is definitely the answer, we gotta use gcloud cli to delete the database in our firebase project.Scrivenor
O
0

You can delete The Collection which will delete all the documents and fields inside it.

It is Given in Firebase Console.

Image

Oxide answered 4/9, 2019 at 11:27 Comment(1)
i want the entire database to be deleted not the collection or its dataSedgewinn
J
0

Depending on how much data is in the DB you could delete it one top-level collection at a time using the firebase CLI command:

firebase firestore:delete "COLLECTION_NAME" --recursive

Where COLLECTION_NAME is the name of a collection at the top level of your DB. This command can only delete a few hundred or thousand docs in a few seconds before it starts failing and you need to run it again. I just keep running it until all the docs and collections in my top level collection are deleted.

Jocular answered 12/5, 2021 at 17:43 Comment(0)
F
-3

You can delete the "database" via "Firestore" using the controls highlighted here:

enter image description here

You can also follow this OFFICIAL link for more info https://firebase.google.com/docs/firestore/manage-databases#update_the_delete_protection_setting

Fibroin answered 2/7 at 20:20 Comment(0)
F
-4

Click on Project Overview.

enter image description here

Now click on the device icon (in this example the Android icon).

enter image description here

Click on the cogwheel icon.

enter image description here

Then at the bottom of the page click on delete project, check all the options and delete your project.

enter image description here

Fibrinogen answered 27/3, 2023 at 18:7 Comment(1)
This will delete the entire project.Antiphony

© 2022 - 2024 — McMap. All rights reserved.