How to fully remove Xcode 4 - xcode

I want to remove all existing SDK versions as well as Xcode 4.
Xcode 4 Guide says to do this:
sudo /Xcode4/Library/uninstall-devtools --mode=all
But I don't have Xcode4 at this location and the only place I see it is under /Developer/Applications
I've already run the uninstall-devtools that was previously found in /Developer/Applications and then did a reinstall.
What else can I do to completely remove everything and start from scratch?

I use this command:
sudo /Developer/Library/uninstall-devtools --mode=all
Edit (1 year later):
If you've downloaded Xcode from the App Store, it's self-contained, as #mediaslave suggests. You can just drag it to the trash or use AppZapper (or a similar utility) to remove the developer tools.
If you're looking to update it, you can also do that straight through the App Store.

sudo /[xcode-path]/Library/uninstall-devtools --mode=all
Normally, [xcode-path] means /Developer, but if you have multiple versions, for example 3 is the first installed, 4 is second, /Developer will be xcode 3's root derectory and /Xcode4 for xcode 4.

Ensure Xcode, iOS Simulator, and the Mac App Store apps aren't running, then trying running the uninstall script at this (different!) location:
/Library/Developer/Shared/uninstall-devtools
This is where I found it.
Also delete Install Xcode.app from Applications folder, and Empty Trash.
Then run App Store again, and find/install Xcode.

su (or sudo su, whatever)
find / -name uninstall-devtools
This will reveal where the utility is...

If you have XCode 4.3.1, just Move To Trash the XCode.app file in the Applications folder.

If you have installed xcode from Mac App store, then you need to delete it from Launch pad. You can do this by locating xcode icon in launch pad, long click on the icon till it starts dancing. Then delete it and wait for a while till the xcode.app is deleted from /Application. If you manually delete xcode.app from /Application, App store will continue to think its installed and will not allow you to reinstall in future.

I tried to uninstall this by deleting it, but the AppStore still thought that it was installed. I deleted some preferences files in my /private directory, which made the AppStore "forget" that I had installed Xcode. I used the following command:
sudo find / -iname '*xcode*' 2> /dev/null | egrep '^/private.*' | xargs -I file sudo rm -rfv file
Which deleted the following files from my computer:
/private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.bom
/private/var/db/receipts/com.apple.pkg.XcodeMAS_iOSSDK_6_1.plist
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-Xcode
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503/CachedSpecifications-xcodebuild
/private/var/folders/7d/n34963zx62s7znxyzn3dn6bh0000gq/C/com.apple.Xcode.503
I do not know what these files are used for, but it made the AppStore forget that it was installed, which is what I needed to happen. In my case, the AppStore was not allowing me to update to the new version of Xcode.

Related

On OS X, difference between drag & drop install vs copying to /Applications

I'm trying to automate the install of Xcode on an OS X machine. I've come across this question that got me most of the way.
The script given in the second answer gets the appropriate dmg mounted, and then uses installer to install the pkg. Except these days (e.g. version 7.3.1) Xcode is given as an app bundle inside the dmg, so there is no pkg to install. So I tried to simply copy it to /Applications via
cp -Rf /Volumes/Xcode/Xcode.app /Applications/
The resulting Xcode in my /Applications folder is 9.1 GB. But if I simply rename that bundle, manually open the dmg, and then drag & drop Xcode onto the Application shortcut, I end up with an Xcode that is 10.51 GB in size. Yet when I ask opendiff to compare the two, it tells me the contents are identical...
Does dragging & dropping from a dmg do something else under the hood, besides simply copying the app into /Applications? If so, is there a way to achieve the same via the command line?

XCode 7.3.1 Update Not Installing

It looks like XCode came out with a new update. This issue seems to be persistent where the iTunes Store does not render the update even though it posts it in the "Updates Installed in Last 30 Days" section. After I restart, I am then prompted to update again even though I have already done it twice. Ultimately, the update does not apply when I open XCode (it still shows 7.3, not 7.3.1):
There is only one way! For this you need:
1. Delete the XCode 7.3 from Applications folder
2. Download the Xcode 7.3.1 from here
3. install it manually
That's it))
A possible method of resolving this issue which has worked for people including myself, is as follows:
Close App Store.
Using terminal type the following:
open $TMPDIR/../C
Locate and then delete the folder named com.apple.appstore
Empty Trash folder, if you get an error message saying that files are in use try the following:
sudo rm -rf ~/.Trash/*
Restart Mac.
Once you have restarted your Mac try to install the update.
If this does not work delete Xcode from /Applications and repeat the above method.

How to uninstall Qt Creator on Mac Yosemite

I have tried this but when I do, the terminal ask me for password. I don't know what this password is? I don't have any password on my mac, i don't enter any password when I login and I can't get passed the first step below.
sudo QtSDK/SDKMaintenanceTool.app/Contents/MacOS/SDKMaintenanceTool
I am uninstalling Qt Creator 2.8.1 on Mac OS Yosemite 10.10 I just want to install the latest 5.3.2 version and get rid of the old one. I could probably choose a new folder but I don't want to do that and it doesn't let me install over the current folder.
I figured it out. Basically I was not able to locate the file because it never shows up in finder but here is how to get there.
From 'Go' menu on Finder, select 'Go to Folder'
Type ~/Library
This will take you to file system. I had two folders related to Qt (Qt and Qt 5.1). Both folders had MaintenanceTool file in it which I run and it asks if you want to uninstall and select yes. This will uninstall Qt Creator and all its components.
Update
Like aksiksi noted in comment below, it maybe installed in root folder for new versions. To go there type / in 'Go to Folder' dialog and look for Qt installation there.
Remove the main Qt directory. If you installed it somewhere else, delete that one instead
rm -rf ~/Qt
Then here are the directories with "Qt" in the name that I found on my system
rm -rf ~/Library/Application\ Support/Qt
rm -rf ~/Library/Caches/QtProject
rm -rf ~/.config/QtProject
Surprisingly there is no up to date instructions to uninstall Qt 5 even on Qt Wiki. Though you can do it easily (I just did it with Qt 5.15.1).
Launch MaintenanceTool.app from Finder, it should be in /Users/your_user_name/Qt by default. Click Next, then check on Uninstall only, that's all.
It removed ~/Qt folder but shamelessly left other folders untouched and you still needs to do #Boris's commands manually:
rm -rf ~/Library/Application\ Support/Qt
rm -rf ~/Library/Caches/QtProject
rm -rf ~/.config/QtProject
the problem is arising because you are using sudo command. Well you have to assign a password to the computer to use that. I also faced the same problem. It's very simple.Just go to
System Prefernces-> Users and Groups -> Change password
Hope this helps.

Xcode won't start, stuck on 'Verifying "Xcode"...'

I've installed Xcode on a mac and when I try to start it I get a little window open saying 'Verifying Xcode' with a status bar scrolling across, anyone got a fix rather than reinstalling?
If you don't want to wait forever, this might help:
xattr -d com.apple.quarantine '/Applications/Xcode.app'
Running a command to get through Gatekeeper sounds like the way to go, since you downloaded it from a trusted source. This is a common occurrence when installing large bundles in Mac OS X. Basically, Gatekeeper examines your entire bundle, making sure that there is no suspicious code. This is one of the many things that keeps Mac OS X as secure as it is. You have two options:
1: Give it time.
Or,
2: Manually tell Gatekeeper "It's okay, this is from a trusted source". How do we do this? Well, first fire up the Terminal and navigate to your Xcode.app folder. (Or type in cd and drag-and-drop Xcode from your applications folder), then hit enter.
Next, run the command:
xattr -d com.apple.quarantine Xcode.app
Now, be careful getting past Gatekeeper if whatever you are installing is even slightly from an untrusted source, or else you introduce a security risk to your computer. In my case, opening new versions of Xcode quickly is the only time I will ever run that command.
anyone got a fix rather than me reinstalling?
For anyone else seeing a very long "Verifying Xcode" phase, just give it time. The indeterminate progress bar stays up there for a long time (tens of minutes) while Gatekeeper looks at the (very large) Xcode bundle to make sure that it's legit. Eventually, you'll get the familiar message along the lines of "This application was downloaded from the Internet. Do you want to continue?" Or, if the bundle doesn't check out, you'll of course get a message to that effect.
Almost every answer here recommends running xattr -d on the file. This deletes the file's extended attributes (like com.apple.quarantine) so OSX will not run the verification phase. You should only do this as an absolute last resort if at all. Apple explicitly recommends leaving Gatekeeper enabled to validate your version of Xcode after XcodeGhost malware was spread to popular iOS apps via infected versions of Xcode.
If you're stuck trying unarchive an Xcode beta .xip archive, try this:
Open the Archive Utility app. (Open Finder by hitting ⌘+spacebar and type "Archive Utility")
Choose File->Expand Archive and select the Xcode archive.
I had same issue. Quick fix is to open terminal from application or type terminal in spotlight and enter below command.
cd /Applications - This will move to applications directory where Xcode is present
xattr -d com.apple.quarantine Xcode.app - This will bypass Gatekeeper in OS X and will launch Xcode quickly
Note: If you have changed name of Xcode (say Xcode7-1) then you should enter ... Xcode7-1.app command. Refer screenshot
open terminal -
1.Type cd drag drop your xcode (for path) then enter
2.next xattr -d com.apple.quarantine Xcode.app enter
agree for terms and condition
For Xcode 8:
To skip the verifying process on El Capitan for Xcode 8, download Xcode 8 at the developer downloads page, then open terminal.
Following this, type
xattr -d com.apple.quarantine
Then drag your xcode 8 download into your terminal window.
It should look like this:
A lot of talk here about exempting Xcode-beta.app from Gatekeeper, but for me, I had to make the .xip file exempt.
I placed Xcode_8_beta_6.xip into /Applications, then in Terminal, changed directory to /Applications and ran:
xattr -d com.apple.quarantine Xcode_8_beta_6.xip
Then double clicked the .xip to get it to unpack.
running xattr -d com.apple.quarantine Xcode.app worked like a charm. Waiting on the "verifying xcode" didn't work, as it never completed.
Also you can remove Open Warning for entire directory Applications via the command in the terminal:
xattr -d -r com.apple.quarantine ~/Applications
it's work for me:
open Terminal cd to path Xcode.app
xattr -d com.apple.quarantine Xcode.app
You can try the command:
xattr -r -d com.apple.quarantine /your_path_to_xcode/Xcode.app
If you do not use -r, you will have to run the same command for the iOS simulator later on. I am not sure what other executables are hidden in this bundle and are quarantined.
If you have time, the recommended method is to leave the verification to complete so that everything is verified properly.
I had the same issue (Macbook Pro, Mid 2015, OS X 10.11.15) and was able to fix it without using the terminal to bypass Gatekeeper:
Trash all previously downloaded versions of the file and empty the trash. (If you haven't emptied your trash in forever this may take a long time. You can selectively delete the offending .xip files manually to save time.) I found multiple instances that would not delete because they were currently in use.
Restart your computer. Now you should be able to delete any .xip files in the trash without issue.
Download the Xcode8 beta again (don't stream media while doing this to save on time and packet loss.) and open it.
If this doesn't do the trick, open up terminal and follow one of the answers above.
Run the following command making sure this is your Xcode's location on the system & replace the xcode name with actual name which code be xcode2 or Xcode 3 incase if you have more versions of Xcode on your machine..
All the best ..
xattr -d com.apple.quarantine Xcode.app
Just wait for process to get over with.. sometimes it takes longer than the usual time but ends up showing the alert boxes for next process! sit back let it finish. :)
If you are not logged in to Xcode try logging in with any Apple account.

Issue with uninstalling Xcode 3.2 on Mountain Lion

I just upgraded to Mountain Lion (from Snow Leopard) so as to take advantage of Xcode 4.
Before installing Xcode 4, I would like to remove Xcode 3 (not required, but want to clean up before moving on).
The standard method of removing Xcode 3 is:
$ sudo <Xcode>/Library/uninstall-devtools --mode=all
However, when I issue this command, even from within the /Library folder, the only thing that happens is I get a "command not found" after entering my password.
I can see uninstall-devtools in Finder, so I know it's there. I just can't execute it for some reason. I've tried every possible way of running the uninstall tools.
Assistance is greatly appreciated. Thanks.
If the file really is there, type sudo in the terminal window (with a trailing space), drag and drop the uninstall-devtools file on the window, then append --mode=all. That should clear any chance you have to make a typo or any other mistake.
Similarly to information I found in another SO article, my laptop's old XCode 3.2 didn't even have the uninstall-tools utility.
So it worked fine for me to simply delete the XCode.app folder.

Resources