背景 现在需要卸载python老版本 通过移除以下目录中的对应python版本后 /Library/Frameworks/Python.framework/Versions /Applications 发现 /usr/local/bin 目录下还有老版本python的失效软链接 因此需要批量清除无效的软链接 命令行 系统目录下需要使用sudo实现删除 brew install symlinks sudo symlinks -d /usr/local/bin