Description
I'm running on MacOS (Mac M1, MacOS Ventura) and have all of my .NET SDKs installed in my user folder at ~/.dotnet
. I also have the following set in my ~/.profile
so builds and things run great.
export DOTNET_INSTALL_DIR="$HOME/.dotnet"
export DOTNET_ROOT="$HOME/.dotnet"
export PATH="$DOTNET_ROOT:$DOTNET_ROOT/tools:$PATH"
I can install the .NET SDK perfectly using the dotnet-install
script.
When I run dotnet-core-uninstall list
, it correctly sees DOTNET_INSTALL_DIR
and lists my SDKs and runtimes.
However, when I try to dotnet-core-uninstall remove
it tells me:
The current user does not have adequate privileges. See https://aka.ms/dotnet-core-uninstall-docs.
All I see in the docs is "it requires admin permissions":
The tool requires elevation to uninstall .NET SDKs and runtimes. Run the tool in an Administrator command prompt on Windows and with sudo on macOS. The dry-run and whatif commands don't require elevation.
It doesn't tell me why and doesn't really make a ton of sense in this use case. It appears to just check for admin permissions and fail out of hand, even if it really doesn't need them.
Would it be possible to maybe do one of these things...?
- Stop requiring admin by default
- Add a
--no-admin
or similar switch to allow bypassing that check - Only check for admin permissions when it's time to modify something that actually might require admin
Alternatively, is there a document that explains what uninstalling a bundle on MacOS means so I could maybe script it? Is it just a matter of dropping the ~/.dotnet/sdk/XXXX
version folder or ~/dotnet/host/fxr/XXXX
version folder?