肇鑫的日常博客

日常

brew应用无法卸载问题的解决

问题

zhaoxin@Mac-mini ~ % brew remove inkscape --cask
==> Uninstalling Cask inkscape
==> Purging files for version 1.4.028868 of Cask inkscape
zhaoxin@Mac-mini ~ % brew info inkscape
==> inkscape: 1.4.230579
https://inkscape.org/
Installed
/opt/homebrew/Caskroom/inkscape/1.4.028868.upgrading (64B)
From: https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/i/inkscape.rb
==> Name
Inkscape
==> Description
Vector graphics editor
==> Artifacts
Inkscape.app (App)
/opt/homebrew/Caskroom/inkscape/1.4.230579/inkscape.wrapper.sh -> inkscape (Binary)
==> Analytics
install: 3,464 (30 days), 9,907 (90 days), 32,521 (365 days)

解决办法

Here’s how you can fully remove Inkscape:

  1. Uninstall the Remaining Version

Run the following command to uninstall the remaining version of Inkscape:

brew remove --cask inkscape
  1. Verify Uninstallation

After running the uninstall command, verify that Inkscape is no longer installed:

brew info inkscape

If Inkscape is still listed as installed, you may need to manually remove any leftover files.

  1. Manually Remove Leftover Files

If Homebrew didn’t fully remove the application, you can manually delete the remaining files:

• Application File:

rm -rf /Applications/Inkscape.app

• Caskroom Directory:

rm -rf /opt/homebrew/Caskroom/inkscape
  1. Clean Up Homebrew

Finally, clean up any unused files and caches in Homebrew:

brew cleanup
  1. Verify Again

Run brew info inkscape once more to confirm that Inkscape has been completely removed.