39

I'm trying to delete Xcode from my MacBook, so I could download the latest version (updating it in the app store just gives me that spinning circle, which has been going on for three days).

However, whenever I drag it into the trash, nothing happens. When I'm deleting it from the applications folder, it says the following:

The item “Xcode” can’t be moved to the Trash because some of its extensions are in use.

One of the suggestions online is to use Activity Monitor to find out any open instances of the app. Well, unless Xcode's extensions are named differently, I didn't see anything that even starts with X in there.

Can anyone help me out pls?

Additional Details:
I'm on El Capitan, attempting to update my Xcode from 6.something to the newer version 7, before this happened.

zack_falcon
  • 1,033

7 Answers7

79

Fixed it by doing the following

1. Control-click on Xcode  
2. Select 'show package contents'  
3. Open folder  
4. Delete plugins folder  
5. Open finder window  
6. Navigate to folder containing Xcode app  
7. Press command-delete and move to bin  
ravindar
  • 916
16

This worked for me:

 1. Open Activity Monitor 
 2. Search for XCode 
 3. Force quit all running instances of XCode
 4. Try again to move XCode to Trash
db42
  • 261
4

The problem for me was that I had the new version of Xcode running. The solution was to close Xcode and then I could delete the beta app file.

Brenden
  • 161
  • 3
2

I had Xcode and the simulator running on another user profile. Closing these windows fixed the problem for me.

1. Log in to your other user profiles which share Xcode
2. Quit any running instance
3. Attempt to delete it 
1

I had an old version of Xcode (10.2) that I kept around in case 10.3 didn't work out. It did work out just fine and I forgot about my renamed instance for a month or so. I saw it sitting in my Applications folder and decided to clean up. It gave me the above message about having extensions in use. Interestingly, the fix was to shut down the NEW instance of Xcode. In other words, the error isn't saying that the Xcode you're trying to delete has extensions in use. It's just saying AN instance of Xcode is in use, so you can't throw any others away. So clear the decks before cleaning out your stable of Xcode versions.

cycollins
  • 111
0

Open a terminal and execute

ps aux | grep 'Xcode.app'

This will list any plugins in use, and you can kill the tasks.

0

Restarting the machine did the trick.

Dave M
  • 13,250
zack_falcon
  • 1,033