0

I run on osx 10.14, and I was trying to delete and reinstall xcode. I have also tried the following in safe mode but have the exact same problems.

I moved xcode.app to trash, right clicked and chose delete immediately. However it tells me item is still in use: enter image description here

Then I tried removing by sudo rm -rf Xcode.app, which tells me that "Directory not empty", as following:

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$ 
  • Kill Xcode first, it is still in use. Command-TAB several times, Q when you are on top of it. – Rui F Ribeiro Mar 9 at 18:48
  • That method gives me no indication that xcode is in use. – Tom Mar 9 at 20:34
  • I am literally running into the same problem right now. I have an old version of Xcode in the trash, and iPhoneSimulator.sdk and WatchSimulator.sdk are not deleting because of some .lproj files. I even restarted in recovery mode and tried to delete them there, and got the same error. Did you every get to the bottom of this? – jchitel Mar 12 at 15:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.