State Clean Uninstall doesn't do what the message or documentation says it does

I created a project and activated it, giving me a local instance that was cached in %LOCALAPPDATA%\activestate. I also deployed an instance to a folder that I specified, using state deploy org/proj --path .

I then ran state clean uninstall for the project, and it gave me the following message:

Please Confirm
You are about to remove the State Tool, installed language runtimes, and all configuration information. Continue? (y/N)

I responded with “y” and then checked to see what happened. Here’s what I found:

  • activestate.yaml remained
  • state.exe remained
  • the perl version associate with the org/proj and cached in %LOCALAPPDATA%\activestate was gone
  • the deployed version of the project remained.

Now, either clean uninstall isn’t doing what it is supposed to be doing, or the message is wrong. If it’s doing the right thing, the message should read:

You are about to remove the installed language runtime for this project. Continue? (y/N)

The documentation for state clean says it will “Clean caches, configuration files, or completely remove the state tool”. For clean uninstall it says “Remove the State Tool, installed languages, and any configuration files”. That sounds like Uninstall does Clean Cache and Clean Config as well as removing the state tool itself. But in my testing, all it does is Clean Cache.

Good Morning @jgpuckering!

Thanks for the report!

It looks like we’ll need to dig a bit, as @gboyce couldn’t reproduce on Linux or Windows either (though I don’t yet know what distro/version he was trying.) (FWIW, I can’t reproduce this on macOS Big Sur either.)

What version of Windows are you running? Is there anything unexpected about the permissions on the directories or files that remain?

Cheers!
–zak

I’m running Windows 10 Home version 20H2 installed 3/14/2021 OS build 19042.867 with Windows Experience Pack 120.2212.551.0.

My account has admin privileges, although that doesn’t mean I don’t need to elevate my shell to Admin for certain tasks – like writing to the system folders. In this case, the install went into %LOCALAPPDATA%\activestate. Nothing special about that. The project working folder (where the activestate.yaml file went) was under c:\sandbox … a place I use for all my work in progress. That’s also where I put the deployed version. Nothing special there.

state.exe and the configuration were in %APPDATA%\activestate (in bin and cli-release respectively). Nothing special there either.

I guess I’ll try a complete clean-out again and start over to see if I can reproduce this can capture the steps precisely. I’ve hit it at least twice. Once was before I had ever even tried state deploy – so I don’t think that’s a part of it.

Can you confirm what the various state clean commands are supposed to do? I mean, specifically, what are they supposed to remove? (If not, since state tool is open source I might have to read the code to figure it out. Presumably, that’s not what you want customers to be resorting to :grinning:)

Thanks! I’ve handed this off to the product team.

Still broken as of 7/13/2021.

PS C:\Windows\system32> state --version ActiveState CLI by ActiveState Software Inc. License BSD 3 Version 0.28.2-SHAbdac00e Revision bdac00ecb11f14510820d58651e9bc85eb4d3741 Branch release Built Mon May 10 2021 23:02:42 +0000 GMT