Skip to content

Instantly share code, notes, and snippets.

@PythonCoderAS
Created May 24, 2022 01:54
Show Gist options
  • Select an option

  • Save PythonCoderAS/1817d8e815d9a8bf7678561bbcaa0b1d to your computer and use it in GitHub Desktop.

Select an option

Save PythonCoderAS/1817d8e815d9a8bf7678561bbcaa0b1d to your computer and use it in GitHub Desktop.
Homebrew uninstall deleted cask #hombrew #homebrew cask #cask #git
# Go to the homebrew-cask directory
$ cd $(brew --repository)/Library/Taps/homebrew/homebrew-cask/Casks
# Bring up commit logs for the interested cask
$ git log --full-history -- jbidwatcher.rb
# Find the SHA of the last commit where the file was active. This will usually be the second commit on the list,
# where the first one is the commit where the file got deleted.
# For the jbidwatcher cask, this was 1d5f7ef8dd72f236d1edd100448473bec127a1e4
# Restore the file.
$ git checkout 1d5f7ef8dd72f236d1edd100448473bec127a1e4 -- jbidwatcher.rb
# Run your command
$ brew uninstall jbidwatcher
# Remove the file
$ rm jbidwatcher.rb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment