> ## Documentation Index
> Fetch the complete documentation index at: https://platform.atlan.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Uninstall and offboarding

> Remove the Atlan desktop app from a managed Mac, including the background runtime, application data, and saved sign-in.

Push the uninstall script from your MDM as a root script. It removes the app,
the background sync runtime, application data, and the saved sign-in for every
user on the machine.

## What it removes

| Item             | Location                                                                                |
| ---------------- | --------------------------------------------------------------------------------------- |
| The app          | `/Applications/Atlan.app`                                                               |
| Sync runtime     | `~/Library/Application Support/Atlan`                                                   |
| Application data | `~/Library/Application Support/com.atlan.dashboard`, plus caches, preferences, and logs |
| Saved sign-in    | Keychain items for `com.atlan.dashboard` and `com.atlan.dashboard.harness-env`          |

<Note>
  **A user's own skill files are never touched.** They are the person's work
  and live wherever they chose to keep them. Uninstalling the app does not
  delete them, and their content is already in your registry.
</Note>

Two things the script deliberately leaves alone:

* **Configuration profiles.** The Full Disk Access grant and any update policy
  are MDM state, not app state. Remove them from your MDM console.
* **Registry data.** Nothing on the device holds the authoritative copy;
  removing a user's access is an admin action in Atlan, not a device action.

## The script

```sh theme={null}
#!/usr/bin/env bash
# Uninstall the Atlan desktop app. Deploy from your MDM as a root script.
#   --user <name>  only this user's data (default: all local users)
#   --dry-run      print what would be removed, remove nothing
#   --keep-data    remove the app and runtime but keep the user signed in
set -uo pipefail

APP="/Applications/Atlan.app"
BUNDLE_ID="com.atlan.dashboard"
KEYCHAIN_SERVICES=("$BUNDLE_ID" "$BUNDLE_ID.harness-env")

ONLY_USER=""
DRY_RUN=0
KEEP_DATA=0
while [ $# -gt 0 ]; do
  case "$1" in
    --user) ONLY_USER="$2"; shift 2 ;;
    --dry-run) DRY_RUN=1; shift ;;
    --keep-data) KEEP_DATA=1; shift ;;
    *) echo "unknown argument: $1" >&2; exit 2 ;;
  esac
done

if [ "$(id -u)" -ne 0 ]; then
  echo "must run as root" >&2
  exit 2
fi

run() {
  if [ "$DRY_RUN" -eq 1 ]; then echo "would remove: $*"; else rm -rf "$@"; fi
}

[ "$DRY_RUN" -eq 1 ] || pkill -f "$APP/Contents/MacOS/" 2>/dev/null || true
[ -d "$APP" ] && run "$APP"

for home in /Users/*; do
  [ -d "$home" ] || continue
  user="$(basename "$home")"
  case "$user" in Shared | .*) continue ;; esac
  [ -n "$ONLY_USER" ] && [ "$user" != "$ONLY_USER" ] && continue

  runtime="$home/Library/Application Support/Atlan"
  [ -d "$runtime" ] && run "$runtime"

  if [ "$KEEP_DATA" -eq 0 ]; then
    for path in \
      "$home/Library/Application Support/$BUNDLE_ID" \
      "$home/Library/Caches/$BUNDLE_ID" \
      "$home/Library/Preferences/$BUNDLE_ID.plist" \
      "$home/Library/Saved Application State/$BUNDLE_ID.savedState" \
      "$home/Library/Logs/$BUNDLE_ID"; do
      [ -e "$path" ] && run "$path"
    done
    for service in "${KEYCHAIN_SERVICES[@]}"; do
      [ "$DRY_RUN" -eq 1 ] && echo "would clear keychain: $service ($user)" && continue
      sudo -u "$user" security delete-generic-password -s "$service" >/dev/null 2>&1 || true
    done
  fi
done

echo "Done. Remove any Atlan configuration profile from your MDM separately."
```

## Common cases

**Offboarding one person from a shared machine**

```sh theme={null}
sudo ./uninstall-atlan-desktop.sh --user jsmith
```

**Checking before you run it fleet-wide**

```sh theme={null}
sudo ./uninstall-atlan-desktop.sh --dry-run
```

**Reinstalling without making everyone sign in again**

```sh theme={null}
sudo ./uninstall-atlan-desktop.sh --keep-data
```
