Uninstall
The installer ships a matching uninstaller. From the install directory (default ~/.deepsql/self-host):
./scripts/uninstall.shOr fetch and pipe:
curl -fsSL https://install.deepsql.ai/uninstall.sh | bashReinstall: 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:
curl -fsSL https://install.deepsql.ai/uninstall.sh | bashcurl -fsSL https://install.deepsql.ai/install.sh | bashWhat it removes
Section titled “What it removes”- All DeepSQL containers (
docker compose down) - All DeepSQL volumes — including the internal Postgres data volume
- The
~/.deepsql/directory (the extracted bundle)
What it does NOT remove
Section titled “What it does NOT remove”- Docker itself (you installed it, you keep it)
- The
@deepsql/mcpglobal 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:
./scripts/uninstall.sh --keep-dataTearing down the CloudFormation stack
Section titled “Tearing down the CloudFormation stack”If you deployed via CloudFormation, the cleanest way to remove everything is:
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.