# Unpaid invoices and deleting a database

> A database with an overdue invoice is paused, not deleted. Deleting waits 24 hours and can be cancelled; backups stay 30 more days.

Source: https://docs.phluit.com/products/managed-databases/unpaid-invoices-and-deleting/

## If an invoice isn't paid

When an invoice is overdue, the database is **paused**: nobody can connect, and the data is kept. It opens again, with the same trusted sources, as soon as the invoice is paid. **Open the invoice** from the database's page to pay it.

## Delete a database

1. Download anything you want to keep first, for example with `pg_dump` or `mysqldump`.
2. Open your database, go to the **Settings** tab and click **Delete this database**.
3. Confirm. The database is deleted 24 hours later. Until then it keeps working, and you can click **Cancel deletion** on its page.

Only the account owner can delete a database. After it's deleted, billing stops. Its backups are kept for 30 more days: [open a ticket](https://portal.phluit.com/tickets/create) if you need one restored. Then they're removed for good.
