我正在使用 homebrew 安装 scrcpy,由于完成安装花费了太长时间,我停止了该过程,现在我想彻底清除任何残留文件和依赖项。删除 scrcpy。
我尝试使用“brew uninstall scrcpy”,但没有成功。
运行
brew autoremove
以删除不再需要的依赖项。
# brew autoremove -h
Usage: brew autoremove [--dry-run]
Uninstall formulae that were only installed as a dependency of another formula
and are now no longer needed.
您还可以运行
brew doctor
检查 Homebrew 设置是否存在任何问题。
通过检查scrcpy的依赖,你会看到以下包:
# brew deps --installed scrcpy
aribb24
brotli
flac
freetype
gmp
graphite2
lame
libb2
libbluray
libevent
libogg
libsamplerate
libsndfile
libsoxr
libtasn1
libvidstab
libvorbis
libxau
libxrender
lz4
lzo
nettle
opencore-amr
p11-kit
pixman
rubberband
speex
srt
theora
xvid
zimg
如果您认为安装了这些依赖项,您可以尝试手动删除它们:
brew uninstall aribb24 brotli ...
此外,我搜索了我的Mac并发现了以下文件。如果它们存在,您可以将其删除:
# find /opt/homebrew/ -name "scrcpy"
/opt/homebrew//bin/scrcpy
/opt/homebrew//var/homebrew/linked/scrcpy
/opt/homebrew//opt/scrcpy
/opt/homebrew//Cellar/scrcpy
/opt/homebrew//Cellar/scrcpy/2.1.1/bin/scrcpy
/opt/homebrew//Cellar/scrcpy/2.1.1/share/bash-completion/completions/scrcpy
/opt/homebrew//Cellar/scrcpy/2.1.1/share/scrcpy
/opt/homebrew//share/bash-completion/completions/scrcpy
/opt/homebrew//share/scrcpy