Skip to content

Uninstall

The installer ships a matching uninstaller. From the install directory (default ~/.deepsql/self-host):

Terminal window
./scripts/uninstall.sh

Or fetch and pipe:

Terminal window
curl -fsSL https://install.deepsql.ai/uninstall.sh | bash

Reinstall: just run uninstall, then install

Section titled “Reinstall: just run uninstall, then install”

As of v1.0.1, this works correctly with no extra flags:

Terminal window
curl -fsSL https://install.deepsql.ai/uninstall.sh | bash
curl -fsSL https://install.deepsql.ai/install.sh | bash
  • All DeepSQL containers (docker compose down)
  • All DeepSQL volumes — including the internal Postgres data volume
  • The ~/.deepsql/ directory (the extracted bundle)
  • Docker itself (you installed it, you keep it)
  • The @deepsql/mcp global npm package
  • MCP config entries in Claude Code / Codex / Cursor — remove those manually if you want a clean slate
  • Any cloud resources (EC2, IAM, etc.) created via CloudFormation — delete that stack separately

Preserving data across reinstalls (advanced)

Section titled “Preserving data across reinstalls (advanced)”

If you’re iterating on the install script and want to keep the existing Postgres + Valkey data across a reinstall of the same version, pass --keep-data:

Terminal window
./scripts/uninstall.sh --keep-data

If you deployed via CloudFormation, the cleanest way to remove everything is:

Terminal window
aws cloudformation delete-stack --stack-name deepsql-selfhost --region <region>

This removes the EC2 instance, IAM role, support user, Secrets Manager secret, and security group in one shot.