Uninstall the CLI
Remove the installer-managed Ansight CLI, resident-host startup entry, account session, optional agent skills, and optional working data.
CLI v0.23.1
The platform uninstallers remove only an installer-managed CLI installation
identified by a valid ansight.cli.installation/v1 receipt. They stop the
resident host, sign out, remove the host startup entry and PATH integration,
and remove the managed CLI files. Ansight Studio and its data are not removed.
Standard uninstall
On macOS or Linux:
curl -fsSL https://www.ansight.ai/uninstall.sh | bash
On Windows PowerShell:
irm https://www.ansight.ai/uninstall.ps1 | iex
In an interactive terminal, the uninstaller asks separately whether to remove installed Ansight agent skills and whether to permanently delete CLI working data. Answering no preserves them. A non-interactive run also preserves both unless explicit removal options are supplied.
What the default removes
The default uninstall performs these actions:
- Stops the resident Ansight host.
- Revokes the current account session when possible, falling back to local sign-out if remote revocation is unavailable.
- Removes the installer-created login service: launchd on macOS, systemd or the desktop autostart entry on Linux, and the scheduled task or Startup entry on Windows.
- Removes the installer-created CLI PATH entry and managed launcher.
- Removes CLI versions, the active-version link or directory, the installation receipt, and cached update state owned by the validated installation root.
If the receipt is absent, invalid, or does not own its installation directory, the script refuses to delete binary files. It can still stop the host and perform any explicitly selected sign-out, skill, or data cleanup.
Preserve or purge data
CLI working data contains local captures, logs, configuration, and local secrets. It is preserved unless you approve the interactive prompt or request a purge explicitly.
| Platform | Purge data | Preserve without prompting |
|---|---|---|
| macOS/Linux | --purge-data | --keep-data |
| Windows | -PurgeData | -KeepData |
Default working-data locations are:
| Platform | Default path |
|---|---|
| macOS | ~/Library/Application Support/Ansight/Cli |
| Linux | $XDG_STATE_HOME/ansight, or ~/.local/state/ansight when XDG_STATE_HOME is unset |
| Windows | %LOCALAPPDATA%\Ansight\Cli |
Use --data-dir <path> on macOS/Linux or -DataDirectory <path> on Windows
when the installation uses a non-default data directory.
Remove agent skills
The optional cleanup removes the installer-managed ansight-cli-setup and
ansight-app-inspection skill directories, including local edits inside them,
from supported agent roots under ~/.agents/skills, ~/.cursor/skills, and
~/.claude/skills.
| Platform | Remove skills | Preserve without prompting |
|---|---|---|
| macOS/Linux | --remove-skills | --keep-skills |
| Windows | -RemoveSkills | -KeepSkills |
Automated uninstall
Pass explicit keep or remove choices in CI and other non-interactive shells.
For macOS or Linux, arguments after bash -s -- are passed to the downloaded
script:
curl -fsSL https://www.ansight.ai/uninstall.sh | \
bash -s -- --keep-data --keep-skills
For Windows, download the script before supplying PowerShell parameters:
$uninstaller = Join-Path $env:TEMP 'ansight-uninstall.ps1'
irm https://www.ansight.ai/uninstall.ps1 -OutFile $uninstaller
& $uninstaller -KeepData -KeepSkills
To remove all CLI working data and installed Ansight skills instead, replace
the keep options with --purge-data --remove-skills or
-PurgeData -RemoveSkills.
All uninstaller options
| macOS/Linux | Windows | Meaning |
|---|---|---|
--install-dir <path> | -InstallRoot <path> | Select the installer-managed CLI root. |
--bin-dir <path> | -BinDirectory <path> | Select the directory containing the ansight PATH entry. |
--data-dir <path> | -DataDirectory <path> | Select CLI working data for sign-out or purge. |
--receipt <path> | -ReceiptPath <path> | Select an installation receipt. |
--cli-path <path> | -CliPath <path> | Select the executable used to stop the host and sign out. |
--purge-data | -PurgeData | Permanently remove CLI working data. |
--keep-data | -KeepData | Preserve CLI working data without prompting. |
--remove-skills | -RemoveSkills | Remove the installed Ansight agent skills. |
--keep-skills | -KeepSkills | Preserve installed agent skills without prompting. |
--local-sign-out | -LocalSignOut | Clear local authentication without remote revocation. |
--no-sign-out | -NoSignOut | Preserve the current account session. |
--keep-startup | -KeepStartup | Preserve launchd, systemd, scheduled-task, or autostart configuration. |
--keep-path | -KeepPath | Preserve installer-created PATH configuration. |
--help | PowerShell Get-Help is not required; inspect the script parameters above. | Show the macOS/Linux script help. |
Conflicting keep and remove options are rejected. The uninstallers also reject unsafe removal targets such as a filesystem root or the user profile directory.
Verify removal
Open a new terminal, then confirm that the managed CLI is no longer resolved:
command -v ansight
On Windows:
Get-Command ansight -ErrorAction SilentlyContinue
If a command remains, it belongs to another installation or PATH entry that the validated receipt did not own and therefore was intentionally preserved.