我收到路径错误。
$ pkgutil --forget com.apple.pkg.CLTools_Executables
Unknown error Error Domain=NSCocoaErrorDomain Code=4 "“com.apple.pkg.CLTools_Executables.bom” couldn’t be removed." UserInfo={NSFilePath=/var/db/receipts/com.apple.pkg.CLTools_Executables.bom, NSUserStringVariant=(
Remove
), NSUnderlyingError=0x7fb0cdc0bd70 {Error Domain=NSPOSIXErrorDomain Code=2 "No such file or directory"}}.
Forgot package 'com.apple.pkg.CLTools_Executables' on '/'.
我要丢弃的收据数据在/System/Library/Receipts/
。
$ ls /System/Library/Receipts/com.apple.pkg.CLTool*
/System/Library/Receipts/com.apple.pkg.CLTools_Executables.bom
/System/Library/Receipts/com.apple.pkg.CLTools_Executables.plist
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_OSX1012.bom
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_OSX1012.plist
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS1013.bom
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOS1013.plist
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOSSDK.bom
/System/Library/Receipts/com.apple.pkg.CLTools_SDK_macOSSDK.plist
为什么要pkgutil
查找物料清单(BOM)文件/var/db/receipts/
?
注意:我已经删除了该文件夹/Library/Developer/CommandLineTools
。