aftman icon indicating copy to clipboard operation
aftman copied to clipboard

How do we uninstall tools?

Open ok-nick opened this issue 2 years ago • 5 comments

The readme states you could uninstall tools, yet there is no option to do so? Is it done implicitly? Has the explicit command not been implemented yet?

ok-nick avatar Jul 17 '22 19:07 ok-nick

This is a good question.

I wonder if we can get away with just aftman uninstall foo or aftman remove foo that removes a tool from your nearest manifest and... maybe deletes the binary?

One of the issues with removing tools is that we don't really know if another manifest file on your computer might be referencing that tool. You might want it to stick around.

This is something we should think about carefully.

LPGhatguy avatar Jul 18 '22 23:07 LPGhatguy

At the very least I think an aftman uninstall command that strictly uninstalls a tool from the system regardless of any manifest would be useful.

Say you're contributing to a project, so you pull down the project to your system and it has an aftman manifest for tooling. You check the tools its going to install and initially believe you trust them, so you install them. Later, for whatever reason you decide you no longer trust them, so you wish to remove them from your system entirely. So, removal from the system and trusted tools should be supported in this case at least.

LastTalon avatar Jul 19 '22 16:07 LastTalon

aftman uninstall x

Uninstalls if there is only one version or prompts a confirmation to uninstall all versions.

aftman uninstall [email protected]

Uninstalls a specific version.

aftman uninstall x --all

Forcefully uninstalls all versions.

aftman uninstall x --local

Uninstalls version from local manifest file.

aftman uninstall x --remove

This will remove it from the local manifest and uninstall it. There is really no way to confirm if that tool version is being cross-referenced by another project, so it probably makes the most sense to allow the user to choose. I don't know how I feel about --remove, it isn't too descriptive.

ok-nick avatar Jul 19 '22 19:07 ok-nick

Perhaps it also makes sense to add a command like this:

aftman uninstall x --distrust

Should be self-explanatory, but it removes the tool from the list of trusted tools. Should this work only if all versions are uninstalled?

ok-nick avatar Jul 19 '22 19:07 ok-nick

I think we could start with just aftman uninstall x and aftman uninstall x/y as a first pass for this feature. If given a tool alias, we'll uninstall that tool if it's known, otherwise uninstall a specific tool name.

LPGhatguy avatar Jul 23 '22 16:07 LPGhatguy