> ## Documentation Index
> Fetch the complete documentation index at: https://docs.omni.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Archiving (deleting) connections

> Archive a database connection to permanently remove it from your Omni organization, including its associated models and content.

Archiving a connection allows you to delete it from your organization.

**When a connection is deleted:**

* The connection and its associated models and content will be moved to the [Trash](/content/navigate#other-pages)
* Sensitive information, such as passwords and keys, will be fully deleted

## Deleting a connection

1. In Omni, navigate to **Settings > Connections**.
2. Click the connection you want to delete.
3. Click the connection's **Archive** tab.
4. Click **Move to trash**.
5. You'll be prompted to confirm the deletion. Confirm by entering the name of the connection in the dialog that displays.
6. Click **Move to trash** again to complete the deletion.

## Deleting a connection via the API

You can programmatically delete connections using the `DELETE /api/v1/connections/{id}` endpoint. This is useful for infrastructure-as-code workflows where connections are managed programmatically. See the [Connections API reference](/api/connections) for authentication requirements, request format, and error codes.

## Deleting a connection

<Tip>
  You can also delete connections using the [Delete connection](/api/connections/delete-connection) API.
</Tip>

1. In Omni, navigate to **Settings > Connections**.
2. Click the connection you want to delete.
3. Click the connection's **Archive** tab.
4. Click **Move to trash**.
5. You'll be prompted to confirm the deletion. Confirm by entering the name of the connection in the dialog that displays.
6. Click **Move to trash** again to complete the deletion.

## Restoring deleted connections

To restore a deleted connection:

1. Click the **Trash** option in the left navigation.
2. Click the **Connections** tab.
3. Locate the connection and click **Restore**.
4. You'll be redirected to the connection's settings page, where you'll need to re-enter any sensitive information like passwords or keys.
5. When finished, click **Update and test connection**.
