Can not exec in WSL bash
mkdir -p ~/dotnet-core-uninstall
wget https://github.com/dotnet/cli-lab/releases/download/1.5.255402/dotnet-core-uninstall.tar.gz
tar -zxf dotnet-core-uninstall.tar.gz -C ~/dotnet-core-uninstall
cd ~/dotnet-core-uninstall
./dotnet-core-uninstall -h

Support for windows and mac ... but not linux?
Same error if i try to run in GH actions ubuntu-latest
- name: install dotnet-core-uninstall
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release download --repo dotnet/cli-lab --pattern 'dotnet-core-uninstall.tar.gz'
tar -xvzf dotnet-core-uninstall.tar.gz
chmod +x dotnet-core-uninstall
- name: dotnet-core-uninstall list
run: ./dotnet-core-uninstall list
/home/runner/work/_temp/32f9f1e6-3b59-4492-b24b-d084a032ca8d.sh: line 1: ./dotnet-core-uninstall: cannot execute binary file: Exec format error
Error: Process completed with exit code 126.
@felickz how was the SDK installed on the Linux host? If via a package manager, using that package manager's commands for uninstalling the SDK would be my suggestion.
This tool is at least partially intended to help clean up systems that don't have quite such a centralized management system.
To anyone else looking for an uninstall script for dotnet, I made a bash based one. It follows the conventions from dotnet-install.sh.
https://github.com/giggio/dotfiles/blob/7efb936e21fb64338bcf16f1859b715ab453ea10/home/bin/dotnet-uninstall