-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
Could "brew cask cleanup" remove older versions? #9586
Comments
Hi @Yann-R, you're right on the money and are doing everything correct; the short answer is "not yet." |
OK, thank you for those explanations. |
until a fix, is it safe to manually remove the folder for the old version? or is there any way at all to have cask remove it itself? and if removed manually, will there be left any traces in a cask "registry" that there ought to exist the old version as well? |
@eallik I removed the old version of LibreOffice manually and the new version still seems to work. |
Is there any other solutions beside |
No, and there won’t be since we’ll stop keeping old versions. |
So there won't have any older versions after I cleanup all existing old versions manually? |
Only after we implement #13201. Until now, everything is still the same. |
@cybertk & @Yann-R: I have a rudimentary ruby script for updating casks here: https://github.com/troyxmccall/dotfiles/blob/49bbdf9773117d7d7b0704e7add41dc5d3f4ff6c/bin/cask-upgrade I also have a cask-retire() bash function that only prunes old versions if that's more up(date) your alley: https://github.com/troyxmccall/dotfiles/blob/8ab354f96f1184cbdd3574b3285a7afe89f2d9f3/.functions#L399-L422 |
@troyxmccall thanks! Shouldn't this line use |
This will clean up cached downloads and tracker symlinks. With −−outdated, it only cleans up cached downloads older than 10 days old. |
brew cask cleanup && brew cask list --versions You'll still see old versions installed. |
I created an updated version of @troyxmccall's function as a script. https://gist.github.com/jpickwell/afb7bfc8b166b58150b6c311f34ed271 My version also removes the old |
@jpickwell, that's brilliant! Probably won't become an official tool, so I made a nice short link: https://j.mp/brew-cask-retire |
Please don’t necropost. Especially in this case, where the script isn’t necessary at all. |
I’ve unlocked since @specious wants to expand on the point of the script. But please note the script is not officially supported. As such, any problems or doubts arising from its use need to be posted at its source, not on the Caskroom organisation. If the discussion elongates more, I’ll relock. |
@vitorgalvao, I fully appreciate your suggestion to continue further discussion pertaining to the maintenance script made available by @troyxmccall and @jpickwell at the appropriate forum. I would like to mention that since Also, it may be necessary in special cases where you installed a new version of an application manually (outside brew cask) over a previously installed cask and then want to manually remove the older installed cask, since you didn't use I'd like to propose to leave this discussion open in good faith that potential participants be respectful and contribute prudently. Locking the topic prevents other contributors from being able to react to a point already made or to provide a different perspective that none of the existing contributors have possibly considered. |
Hello,
Currently, when I install a new version of a software like this (libreoffice is just an example):
brew cask install libreoffice
brew cask cleanup
I get the new version of the software (if available), but the older version remains with the new one in the Caskroom.
It's not very practical and not consistent with
brew cleanup
. See man page:Did I miss something?
Is there some workaround to perform a cleanup of older installed versions?
Is there a way to upgrade a software another way than with my command 1 above?
The text was updated successfully, but these errors were encountered: