无法永久删除垃圾箱中的 Xcode.app,即使使用“sudo rm -rf”也无法删除,因为目录不为空?

无法永久删除垃圾箱中的 Xcode.app,即使使用“sudo rm -rf”也无法删除,因为目录不为空?

我在 osx 10.14 上运行,我试图删除并重新安装 xcode。我还在安全模式下尝试了以下操作,但遇到了完全相同的问题。

我将 xcode.app 移至垃圾箱,右键单击并选择delete immediately。但它告诉我该项目仍在使用中: 在此输入图像描述

然后我尝试删除 by sudo rm -rf Xcode.app,它告诉我“目录不为空”,如下所示:

users-mac:~ User$ cd ./.Trash/

users-mac:.Trash User$ sudo rm -rf Xcode.app/
Password:
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System/Library/UsageBundles/MessagesUsagePreferencesPlugin.bundle/en_AU.lproj: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System/Library/UsageBundles/MessagesUsagePreferencesPlugin.bundle: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System/Library/UsageBundles: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System/Library: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform/Developer: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/WatchSimulator.platform: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/FTClientServices.framework/fi.lproj: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/FTClientServices.framework: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform/Developer: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms/iPhoneSimulator.platform: Directory not empty
rm: Xcode.app//Contents/Developer/Platforms: Directory not empty
rm: Xcode.app//Contents/Developer: Directory not empty
rm: Xcode.app//Contents: Directory not empty
rm: Xcode.app/: Directory not empty

users-mac:.Trash User$ ls -la Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator.sdk/System/Library/PrivateFrameworks/FTClientServices.framework/fi.lproj/
total 0
drwxr-xr-x  3 root  wheel  96 Mar  9 02:06 .
drwxr-xr-x  3 root  wheel  96 Mar  9 02:45 ..

users-mac:.Trash User$ ls -la Xcode.app/Contents/Developer/Platforms/WatchSimulator.platform/Developer/SDKs/WatchSimulator.sdk/System/Library/UsageBundles/MessagesUsagePreferencesPlugin.bundle/en_AU.lproj/
total 0
drwxr-xr-x  4 root  wheel  128 Aug 27  2016 .
drwxr-xr-x  3 root  wheel   96 Mar  8 23:04 ..
users-mac:.Trash User$ 

相关内容