-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A command to upgrade all casks ? #13256
Comments
There is no official method for upgrading homebrew casks. This is currently being worked on, but it is still very far from completion. See #4678 for more details. That issue also has some examples of scripts that users use to upgrade all of their casks. The simplest way to upgrade a single cask would be to run |
After #13201 is done, we’ll be able to start working on an upgrade solution. Until then, @scribblemaniac’s answer is correct. |
#!/bin/bash
# /usr/local/bin/brew-cask-reinstall
# Usage: brew cask-reinstall token1 token2 ...
for token in "$@"; do
echo "==> Re-installing $token"
brew cask uninstall --force "$token" && brew cask install "$token"
done Sidenote: Will Homebrew Cask support external commands like brew does in the future? |
Actually, I recommend: caskup() {
rm -rf "$(brew --cache)"
brew update
brew cask uninstall --force "$@"
brew cask install "$@"
} If you don’t get rid of the cache and try to reinstall a cask with There are no plans for a |
Ah I see. The thing is, flushing the cache and re-downloading are sometimes long operations so I save those for other invocations. Even from a less pragmatic standpoint, I don't think reinstall should do anything in addition to what install does – "reinstall" basically should be "remove and install". Also my question about the external commands was, will Homebrew Cask support the invoking external commands that begin with |
If you don't like the look of the command, you can always just use |
No I can't. I want it to look like @vitorgalvao this discussion should be in a separate issue, huh |
Oh, I didn't realize alias names couldn't have spaces (I don't use them very often). Anyway, this should indeed be a separate issue. |
I posted an answer to the stackoverflow, but figured it wouldn't hurt to put it here as well. I wanted a function that let me interactively choose which casks to re-install or not. I also put the --quick argument in to not have to blow away the cache and update if I had just done so but exited out.
|
Personally, I use
It's not totally perfect (otherwise why would we wait for a built-in upgrade command ;-)) |
Hi, I created brew-cask-upgrade.sh |
There are tons of those scripts. Please stop posting them. There are more than enough, and they all suffer from the same issues. |
What is the best method on updating and upgrading a cast? Say I have webstorm and I want to update to a new version? Is there a method to upgrade all casks at once?
The text was updated successfully, but these errors were encountered: