Skip to content

Uninstall Dockmesh

The uninstaller mirrors the install flow: interactive by default, non-interactive with --yes. You choose per-component what to remove — stopping the service, removing the binary, removing the data directory, and so on are each separate questions you can answer independently.

  • Running containers. Stacks deployed through dockmesh keep running after uninstall. The compose project labels stay on the containers; you manage them manually with docker compose from their stack directories going forward.
  • Docker itself. dockmesh is removed, the daemon stays.
  • Anything outside the dockmesh data / asset / binary / service directories.
Terminal window
curl -fsSL https://get.dockmesh.dev/uninstall | sudo bash

You’ll be asked, per component:

  • Stop the running service? (default Y)
  • Remove the service unit / LaunchDaemon plist? (default Y)
  • Remove the dockmesh binary? (default Y)
  • Remove the agent installer + bundled agent binaries? (default Y)
  • Remove the data directory — DB, stacks, age keys, env? (default N — destructive)
  • Remove the dockmesh service user (Linux only)? (default Y)

The only default that’s “no” is the data directory removal. A wiped data dir can’t be recovered: the age key that encrypts your .env files and backups lives inside it, so without the key even your existing backups become undecryptable. Answer y only if you really want dockmesh gone completely.

Terminal window
# Accept every default — keeps the data dir
curl -fsSL https://get.dockmesh.dev/uninstall | sudo bash -s -- --yes
# Complete purge — data dir included. Cannot be undone.
curl -fsSL https://get.dockmesh.dev/uninstall | sudo bash -s -- --purge
# See what would happen without executing
curl -fsSL https://get.dockmesh.dev/uninstall | sudo bash -s -- --dry-run

If you’d rather not pipe-to-bash, the script lives at scripts/uninstall.sh in the repo. Download, inspect, run.

Or do it yourself step by step:

Terminal window
# Stop + disable the service
sudo systemctl disable --now dockmesh.service
# Remove the unit
sudo rm /etc/systemd/system/dockmesh.service
sudo systemctl daemon-reload
# Remove the binary + CLI
sudo rm /usr/local/bin/dockmesh /usr/local/bin/dmctl
# Remove agent assets
sudo rm -rf /usr/local/share/dockmesh
# (Optional) remove the data directory — THIS IS DESTRUCTIVE
sudo rm -rf /var/lib/dockmesh
# (Optional) remove the service user
sudo userdel dockmesh
Terminal window
# Unload the LaunchDaemon
sudo launchctl bootout system/dev.dockmesh.service
# Remove the plist
sudo rm /Library/LaunchDaemons/dev.dockmesh.service.plist
# Remove the binary + CLI
sudo rm /usr/local/bin/dockmesh /usr/local/bin/dmctl
# Remove agent assets
sudo rm -rf /usr/local/share/dockmesh
# (Optional) remove the data directory — THIS IS DESTRUCTIVE
sudo rm -rf /usr/local/var/dockmesh

If you kept the data dir, reinstalling picks up exactly where you left off — same DB, same stacks on disk, same admin user, same age key:

Terminal window
curl -fsSL https://get.dockmesh.dev | sudo bash
sudo dockmesh init

The init wizard detects the existing data dir, skips DB initialization, and reuses your admin user. Encrypted .env files stay readable because the age key is still in place.

“userdel dockmesh failed” — some process still runs under the dockmesh user. Usually a lingering dockmesh serve someone started manually. Kill it (sudo pkill -u dockmesh), re-run uninstall, or remove the user manually afterwards.

Data directory wasn’t removed even with --purge — as a safety check the uninstaller verifies the directory actually looks like a dockmesh data dir (contains data/, stacks/, or dockmesh.env) before deleting it. If your data dir is in a non-standard path, point the uninstaller at the right place with DOCKMESH_DATA_DIR=/your/path before running.

“uninstaller removed my binary but service didn’t stop” — you probably answered “no” to the “stop service” question. The service is still trying to start via launchd / systemd but the binary is gone. Re-run the uninstaller with --yes or remove the service unit manually.