My Mac is running out of disk. I searched for large files and directories and found the directory /Applications/Xcode.app/Contents/Developer/Platforms
takes about 20GB of my disk.
ls -l
total 0
drwxr-xr-x 10 root wheel 320 Dec 18 14:37 AppleTVOS.platform
drwxr-xr-x 7 root wheel 224 Dec 18 15:10 AppleTVSimulator.platform
drwxr-xr-x 8 root wheel 256 Dec 18 14:44 MacOSX.platform
drwxr-xr-x 10 root wheel 320 Dec 18 15:10 WatchOS.platform
drwxr-xr-x 7 root wheel 224 Dec 18 15:10 WatchSimulator.platform
drwxr-xr-x 10 root wheel 320 Dec 18 15:10 iPhoneOS.platform
drwxr-xr-x 8 root wheel 256 Dec 18 15:10 iPhoneSimulator.platform
I looked at the names of the folders, which are seemingly simulator, aka virtual machine, for different Apple operating systems.
I am a stranger in Apple os development and share no interest in it. I only write c, java, python, html and all that with my Mac. Can I delete these unnecessary files? Or should I keep the MacOSX.platform at least?
More than just wasting space, the junk can slow Xcode down, sometimes making it non-responsive. When this happens, you need to clean Xcode by completely removing old cache files and the app itself before doing a fresh Xcode install. If you think you don't need help uninstalling Xcode, think again.
In Xcode 2.4, you select the file in the main project window and either press the delete/backspace button, or control-click and select Delete from the pop-up menu. It then asks if you want to delete the file and all references to it, or just the references, leaving the file still present in the project folder.
Close xcode first then open it again , at rigght menu you will see name of your project , clikc on on 'show on finder' .Then delete the project folder
Can I delete Xcode? What will doing so break? How can I delete Xcode gracefully? Show activity on this post. Yes, you can, as long as you install the command line tools.
Alternatively, in Xcode, using the Navigator (left pane), expand the group "Products", right-click on the .app file and choose "show in finder". An optional, albeit a bit clumsy, method is to make a change to a given project and then use the Finder to locate files modified in that time span. See Xcode Help for various details on it's use.
Yes, you can, as long as you install the command line tools. You can then install the command line tools with xcode-select --install You must log in to answer this question.
Don Mag advice is good.
I would not remove anything from the /Applications/Xcode.app folder as this could cause you issues running Xcode.
There is a folder in ~/Library/Developer though that stores downloaded version of the DeviceSupport for any version of iOS/tvOS/watchOS etc that you have been developing for. Every time an OS is updated another download appears in these folders and older version are not removed automatically.
Any of these can be removed as they will download again automatically the next time you build to an OS version. Though bear in mind the extra wait time needed on the first build of an uncache version.
I use an App from the App Store called 'DevCleaner' which allows me to select any DeviceSupport files, Archives (I tend to keep these) and Derived data. It's useful as it shows how much space each folder is taking up.
I select everything but the latest versions of the OSes I am developing for.
Hope that helps.
Yes you can delete platforms from this folder
but make sure that you remove a platform and the simulator, otherwise Xcode will refuse to restart after
Example for Ios watch :
remove WatchOS.platform
and also WatchSimulator.platform
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With