brew can't uninstall 0.17.1 missing blank.sh
hey,
when i try to upgrade my packages with homebrew it can't uninstall version 0.17.1.
$ brew uninstall netclient
==> Uninstalling Cask netclient
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
Error: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.
I was able to upgrade to 18.5 by running ...
brew update
brew cleanup
sudo rm -rf /opt/homebrew-cask/Caskroom/netclient
sudo rm /Applications/netclient
UPDATE:
Error this exists in 18.5
brew remove netclient
==> Uninstalling Cask netclient
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.18.5/blank.sh
Error: uninstall script /opt/homebrew/Caskroom/netclient/0.18.5/blank.sh does not exist.
hmm your steps didn't work for me:
$ brew update; brew upgrade $(brew outdated); brew upgrade --cask $(brew outdated --cask)
Already up-to-date.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Purging files for version 0.18.5 of Cask netclient
Error: gravitl/netclient/netclient: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Purging files for version 0.18.5 of Cask netclient
Error: gravitl/netclient/netclient: uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh does not exist.
Hello. working on a fix for that. For now just run "touch /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh" and try again.
After i touched that file, i get this now.
$ brew update; brew upgrade $(brew outdated); brew upgrade --cask $(brew outdated --cask)
Already up-to-date.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Running uninstall script
==> Purging files for version 0.18.5 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
==> Upgrading 1 outdated package:
gravitl/netclient/netclient 0.17.1 -> 0.18.5
==> Upgrading netclient
==> Downloading https://fileserver.netmaker.org/v0.18.5/darwin/netclient-arm64.tgz
Already downloaded: /Users/simon/Library/Caches/Homebrew/downloads/585370da98be39b68e147c56e26daaa223311455f9e891924c76e0f80f326be4--netclient-arm64.tgz
All formula dependencies satisfied.
==> Running uninstall script /opt/homebrew/Caskroom/netclient/0.17.1/blank.sh
==> Running uninstall script
==> Purging files for version 0.18.5 of Cask netclient
Error: Cask 'netclient' definition is invalid: uninstall :script without :executable.
cd home if you aren't there already. run "brew edit netclient" in the uninstall block near the bottom of the file put the following: executable: "#{staged_path}/blank.sh",
actually, in brew edit netclient, are there two uninstall blocks?
there are yes, i did see that.
delete the empty one. that shouldn't be there.
okay, just did that.. it's still not quite happy.
I think is the origin of the problem, that the brew configuration is invalid.
https://github.com/gravitl/homebrew-netclient/issues/23#issuecomment-1353408364
@zyxep after you upgraded to 18.1, do you also see this issues?
https://github.com/gravitl/netclient/issues/325 https://github.com/gravitl/netclient/issues/326
use the netclient uninstall command to remove netclient from your system