Atlantis, how to clear locks that are stuck

David Gamba, @gambaeng
version 0.1, 2026-06-24 #boltdb #atlantis

I was having issues with Atlantis locks, where the UI would show a lock but trying to follow the link would return no lock id found.

After trying afew things, the only solution that worked was to clear the lock directly from the bolt database.

I checked the docs and atlantis uses a Bolt database for the locks. We save it in /atlantis-data/atlantis.db.

I looked for a CLI to access the Bolt DB and found this repo: https://github.com/br0xen/boltbrowser I cloned it and built the cli for amd64 with: GOOS=linux GOARCH=amd64 go build.

Then I copied the binary over to the /atlantis-data/ dir in my running pod: k cp -n atlantis boltbrowser atlantis-0:/atlantis-data/

If you try editing the db directly it fails with:

$ ./boltbrowser atlantis.db
File atlantis.db is locked. Make sure it's not used by another app and try again

So I…​

  1. Disabled applies in the UI.

  2. Created a copy: cp atlantis.db atlantis.db.updated

  3. ./boltbrowser atlantis.db.updated

  4. Found the runLocks that were failing and deleted them.

  5. Copied back: cp atlantis.db.updated atlantis.db

  6. Restarted the pod: k rollout restart sts atlantis