Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I remove a cask without uninstalling the application?

I recently installed an app with homebrew-cask, but I want to handle its updates by myself and not via brew cask upgrade.

Is there a command or option to remove a cask from the local list, without uninstalling it?

If I use brew cask remove or brew cask uninstall the app will be uninstalled.

I'm looking for something like brew cask forget or something similar.

like image 302
Dave3o3 Avatar asked Nov 14 '18 13:11

Dave3o3


2 Answers

I found an answer over at Apple Stack Exchange: Delete the folder of the app you want to forget from /usr/local/Caskroom.

like image 186
stephenwade Avatar answered Oct 19 '22 16:10

stephenwade


It does not exist a way of unlink/forget a cask in the new version. It was possible to unlink a cask in previous versions but this changed, now the only thing like this is rename the artifact itself instead of a link.:

  • https://github.com/Homebrew/homebrew-cask/issues/13201

I suggest you the next:

  • You could install the app manually without using brew cask this will prevent cask of knowing about the app so you'll be able to control when to upgrade the app.

  • In case you´ve already installed the app you can uninstall it and then install it manually or just change the name of the app, for example, adding the prefix _App.app then uninstall it using brew cask uninstall App and then rename it to the original name: App.app.

  • Another option is removing autoupdate true from the formulae, you can do this using brew cask edit app and then removing it, this will prevent the app to be upgraded when you use brew cask upgrade. You'll need to know the app will be upgraded in case you run brew cask upgrade --greedy, so instead upgrade the apps without autoupdate true one by one: brew cask upgrade app. You'll know which apps can be updated but they're not automatically updated using brew cask outdated --greedy.

  • Finally, using brew tap homebrew/cask-versions you can control the versions you want to have installed if they're available in https://github.com/Homebrew/homebrew-cask-versions/tree/master/Casks.

like image 26
Pau Avatar answered Oct 19 '22 16:10

Pau