Uninstall

Problem Description

The State Tool does not uninstall from my system after running the standard uninstall command state clean uninstall.

Potential Solutions

To uninstall the State Tool you should be able to simply run state clean uninstall. Make sure that you are not currently running any State Tool processes before running this command.

If for some reason the standard uninstall does not work you can try to manually uninstall it by following the steps below.

Windows

1. Stop Running Processes

Before attempting to remove any files please ensure that you’ve stopped your State Tool processes. These can be identified by having the name state or the prefix state-.

If you’re not sure how to do this you can follow the steps below which should automatically kill any State Tool processes for you.

  1. Open up the Start Menu and search for cmd
  2. Locate the Command Prompt entry and right click it, then select Run as Administrator.
  3. In the command prompt that opens, paste in the following one-liner command and press enter.
powershell -Command "& $([scriptblock]::Create((New-Object Net.WebClient).DownloadString('https://platform.activestate.com/dl/cli/stop.ps1')))"

2. Delete Files & Folders

Delete the following files and folders:

  • %AppData%\..\Local\activestate\StateTool
  • %AppData%\..\Local\activestate\cache
  • %AppData%\ActiveState\cli-release (note: change release to beta if you are using the beta branch)

3. Update Environment Variables

Edit your environment variables and delete any PATH entries matching any of the directories mentioned in step 2.

Linux

1. Stop Running Processes

Before attempting to remove any files please ensure that you’ve stopped your State Tool processes. These can be identified by having the name state or the prefix state-.

If you’re not sure how to do this you can follow the steps below which should automatically kill any State Tool processes for you.

  1. Open a Terminal
  2. In the command prompt that opens, paste in the following one-liner command and press enter.
sudo bash -c 'sh <(curl -q https://platform.activestate.com/dl/cli/stop.sh)'

2. Delete Files & Folders

Delete the following files and folders:

  • ~/.local/ActiveState/StateTool/
  • ~/.cache/activestate/
  • ~/.config/activestate/cli-release/ (note: change release to beta if you are using the beta branch)

3. Update Environment Variables

Edit the RC file that applies to your shell:

  • ZSH: ~/.zshrc
  • Bash: ~/.bashrc
  • Fish: ~/.config/fish/config.fish
  • tcsh: ~/.tcshrc

Search for lines phrased START ACTIVESTATE and STOP ACTIVESTATE and delete anything in between, including said lines. For example:

# -- START ACTIVESTATE INSTALLATION
export PATH="/home/user/.local/ActiveState/StateTool/:$PATH"
# -- STOP ACTIVESTATE INSTALLATION

For this example you would delete all 3 mentioned lines.

macOS

1. Stop Running Processes

Before attempting to remove any files please ensure that you’ve stopped your State Tool processes. These can be identified by having the name state or the prefix state-.

If you’re not sure how to do this you can follow the steps below which should automatically kill any State Tool processes for you.

  1. Open a Terminal
  2. In the command prompt that opens, paste in the following one-liner command and press enter.
sudo bash -c 'sh <(curl -q https://platform.activestate.com/dl/cli/stop.sh)'

2. Delete Files & Folders

Delete the following files and folders:

  • ~/.local/ActiveState/StateTool/
  • ~/Library/Caches/activestate/
  • ~/Library/Application\ Support/activestate/cli-release/ (note: change release to beta if you are using the beta branch)

3. Update Environment Variables

Edit the RC file that applies to your shell:

  • ZSH: ~/.zshrc
  • Bash: ~/.bashrc
  • Fish: ~/.config/fish/config.fish
  • tcsh: ~/.tcshrc

Search for lines phrased START ACTIVESTATE and STOP ACTIVESTATE and delete anything in between, including said lines. For example:

# -- START ACTIVESTATE INSTALLATION
export PATH="/Users/user/.local/ActiveState/StateTool/release:$PATH"
# -- STOP ACTIVESTATE INSTALLATION

For this example you would delete all 3 mentioned lines.