xcode manual cleaning

This article is only for developers using Xcode.

If you don't clean up some files in Xcode for a long time, you will find that your mac hard disk is getting smaller and smaller, and this is the hard disk that 其他accounts for most of the hard disk. I have searched many ways on the Internet and have not found how to clean up these 其他
files and then go back and forth in the folder I found that ~/Library/Developer/Xcodethis Xcode folder is surprisingly large, dozens of G, and then I went to check some information and record it here.


Before cleaning.png


The above picture is already the hard disk capacity after deleting the content of DerivedData and Archives of nearly 10 G.


After cleaning.png

It can be seen that about 30 G of hard disk space has been cleared. For a small-capacity mac, this is simply...

Here are some cleaning methods:
Open Finder and use the shortcut key command+shift+g to enter the path to enter the folder

1. Remove DerivedData, it is recommended to clean it regularly, it will be regenerated

In this folder are the cache files generated by the simulator running each APP. After deleting, just re-run the APP, it will take a long time to recompile, and the cache files will be generated again.
~/Library/Developer/Xcode/DerivedData

2. Remove Archives, you can clean up

The content in this folder is generated when packaged with Xcode, and can be selectively deleted according to whether it is useful or not. After deletion, the packaged files under Xcode->Organizer will all be emptied
~/Library/Developer/Xcode/Archives

3. Remove iOS DeviceSupport, it is recommended to clean up, the connected device will be regenerated

This folder saves the version support for your device. Each version folder is several G in size. You only need to keep the folder of the current version of your device. Even if you delete all of them, Xcode will reconnect the device. Processing symbol files appear and regenerate the corresponding version of the file
~/Library/Developer/Xcode/iOS DeviceSupport

4. Remove the emulator file, you can clean it up, running the emulator will regenerate

The folders in this folder are all named after the UDID of the emulator. You can check the .default_created.plist file to determine that each folder is an emulator of a certain device type under a certain version according to the folder name and the contents of the plist file. The .default_created.plist file is a hidden file, you need to turn on display and hide to view it
~/Library/Developer/CoreSimulator/Devices

Positive from: https://blog.csdn.net/u012338816/article/details/55511621

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324599160&siteId=291194637