# Uninstall Ringleader

> For the complete documentation index, see [llms.txt](https://docs-stg.ringleader.dev/llms.txt).


> Remove the Ringleader application and the rl command line from a Mac or a Windows PC, and decide what to keep.


Remove the Ringleader application and the `rl` command line from a Mac or a Windows PC, and
decide what to keep. Your workstations' disks and records stay on the computer unless you
delete them too.

## Prerequisites

- Administrator rights on the computer. macOS asks for your password, and Windows asks for
  administrator permission.

## Remove Ringleader


### macOS


Run these commands in a terminal. They quit the application, remove the command-line links
that lead into it, then remove the application itself. They remove the links first, while
the links still lead somewhere. The installer only ever created links, and it moved aside
anything it found at Ringleader's own names, so these steps put back exactly what was there
before. If you turned on **Let tools find Docker at /var/run/docker.sock** in Settings, they
also remove that link and the startup job that creates it:

```bash
# Stop the application and its background service. This also asks every vz
# workstation to shut down.
pkill -f Ringleader.app
rl daemon stop 2>/dev/null || true

# Give the vz workstations up to 90 seconds to power off, then stop any that
# remain.
helper=/Applications/Ringleader.app/Contents/Resources/bin/ringleader-vz
for _ in $(seq 45); do
  pgrep -f "^$helper" >/dev/null || break
  sleep 2
done
pkill -9 -f "^$helper" || true

# Find the links that lead into the application, including links earlier
# releases made. `ringleader` leads there through `rl`, so check every one
# before removing any.
ours=()
for f in /usr/local/bin/{rl,ringleader,docker-credential-ringleader,docker,kubectl,kind,helm,lima,limactl} \
         /usr/local/lib/docker/cli-plugins/docker-{compose,buildx} /usr/local/share/lima; do
  if [ -L "$f" ] && realpath "$f" 2>/dev/null | grep -q '^/Applications/Ringleader.app/'; then
    ours+=("$f")
  fi
done

# Remove them, and put back anything the installer moved aside.
for f in "${ours[@]}"; do
  sudo rm -f "$f"
  if [ -e "$f.pre-ringleader" ] || [ -L "$f.pre-ringleader" ]; then
    sudo mv "$f.pre-ringleader" "$f"
  fi
done

# Remove the startup job that links /var/run/docker.sock to the container
# runtime, and the link itself when it leads where the job points it. If you
# never turned the setting on, these change nothing.
job=/Library/LaunchDaemons/dev.ringleader.default-docker-socket.plist
target=$(/usr/libexec/PlistBuddy -c 'Print :ProgramArguments:2' "$job" 2>/dev/null)
if [ -n "$target" ] && [ "$(readlink /var/run/docker.sock)" = "$target" ]; then
  sudo rm -f /var/run/docker.sock
fi
sudo launchctl bootout system/dev.ringleader.default-docker-socket 2>/dev/null || true
sudo rm -f "$job"

# Remove the application.
sudo rm -rf /Applications/Ringleader.app
```

If you switched `docker` to Ringleader's container runtime, switch it back too: for example,
`docker context use desktop-linux` for Docker Desktop, or `docker context use default`.

Your data folder, `~/.ringleader`, stays. It holds the disks of your workstations.



### Windows


1. Optional: free the disk space your workstations use first. Delete your `hcs`
   workstations with `rl workstation delete <name>`, then run `rl image delete --unused`.
   That deletes the base disks kept for your Windows account, and the downloaded images
   nothing uses.
2. In Windows **Settings**, open **Apps → Installed apps → Ringleader → Uninstall**.

Uninstalling stops every `hcs` workstation on the PC, for every Windows account, and removes
the Ringleader VM Service. It leaves these folders:

- `%ProgramData%\RingleaderVM` holds the disks of every account's `hcs` workstations and the
  [base disks](https://docs-stg.ringleader.dev/reference/cli/commands/images/#image-location) they're built on. If you
  install Ringleader again, a workstation that was running starts again on its own disk. A
  stopped one stays stopped until you start it. Uninstalling removes the folder itself only
  when no workstation disk is left in it.
- `%ProgramData%\Ringleader` holds the installer's log, `install.log`.
- `%USERPROFILE%\.ringleader` is your data folder. It holds your workstation records.






## Remove what Ringleader left behind

Delete what the uninstall leaves only if you no longer need your workstations.


### macOS


Remove your data folder, which holds the disks of your workstations:

```bash
rm -rf ~/.ringleader
```



### Windows


1. Delete every account's workstation disks. Run this in PowerShell opened as an
   administrator:

   ```powershell
   Remove-Item -Recurse -Force "$env:ProgramData\RingleaderVM"
   ```

2. Remove `%USERPROFILE%\.ringleader` too if you want nothing of Ringleader left on the PC.






## Troubleshoot

- If `docker` fails with `error getting credentials` after you uninstall on a Mac, your
  Docker configuration still names Ringleader's credential helper. Put back
  `~/.docker/config.json.pre-ringleader`, or change `"credsStore"` in
  `~/.docker/config.json` to your own helper and run `docker login` again.

## Next steps

- [Install Ringleader](https://docs-stg.ringleader.dev/install/) installs it again. On Windows, a
  workstation that was running when you uninstalled starts again on its own disk, if you
  kept it. A stopped one stays stopped until you start it.

