--- title: "Delete a database" description: "Delete a TIR DBaaS database, and keep the data you need first, because its storage is removed and its snapshots go with it." content_type: "how-to" product: "tir-dbaas" platform: "TIR" url: "/tir/tir-dbaas/how-to/delete-a-database/" topic: ["power-and-lifecycle"] --- # Delete a database Deleting a database removes its node and its storage, and its snapshots go with it. Deleting is permanent, so keep what you need before you start. To pause a database and keep it, stop it instead. See [Stop, start and restart a database](/tir/tir-dbaas/how-to/stop-start-and-restart-a-database/). ## Before you begin - The delete permission for DBaaS in the project. See [TIR Access Control](/tir/tir-iam/). - A copy of any data you want to keep. The database's snapshots go with the database, so you can restore one only before the delete. To keep the data, do one of these first: - Restore a snapshot into a new database, which is a separate database. See [Restore a database from a snapshot](/tir/tir-dbaas/how-to/restore-from-a-snapshot/). - Export the data with your own PostgreSQL backup tools while the database is **Running**. See [Connect to a database](/tir/tir-dbaas/how-to/connect-to-a-database/). You can delete a database in any state except **Terminating**, including while it is **Creating**, **Stopped** or **Failed**. ## What is deleted - The database's node and its storage, with all the data on it. - Every snapshot of the database, manual and scheduled, goes with it: the snapshots leave the list, and restoring one is possible only before the delete. The snapshot schedule turns off as soon as you delete. - The database's public address. Its address on the attached VPC is released. The parameter group the database used is kept. Once the delete finishes, you can delete the group too, when the last database using it is gone. See [Use parameter groups](/tir/tir-dbaas/how-to/use-parameter-groups/). ## Delete the database 1. In the side menu, under **Databases**, select **DBaaS**. 2. Choose **Delete** in the database's row menu on the **Manage Databases** list, or in the three-dot menu on its details page. 3. Deleting the database's data is permanent. To go ahead, tick "I understand and want to delete the database" followed by the database's name. 4. Select **Delete**. The database is **Terminating** while it is removed, and then leaves the list. The delete is recorded on **Activity Timeline** as "Database deleted". If the launch of a new database failed, its page also has **Delete database**, which you can use instead. ## When a delete fails If TIR refuses the delete, it gives the reason, for example that the database is already being deleted, and you can try again. If the removal fails partway, the database turns **Failed** and TIR raises a support ticket for it. For what to do next, see [Troubleshooting TIR DBaaS](/tir/tir-dbaas/troubleshooting/tir-dbaas/).