Xcode.appのメンテナンス

# File Paths

## /Applications
* /Applications/Xcode.app

## /Library
* /Library/Developer/
    * CommandLineTools/
    * CoreSimulator/
    * PrivateFrameworks/
* /Library/Preferences/
    * com.apple.dt.Xcode.plist

## ~/Library
* ~/Library/Application Scripts/
    * com.apple.dt.BitbucketHostBuiltInExtension/
    * com.apple.dt.BitbucketServerHostBuiltInExtension/
    * com.apple.dt.GitHubEnterpriseHostBuiltInExtension/
    * com.apple.dt.GitHubHostBuiltInExtension/
    * com.apple.dt.GitLabHostBuiltInExtension/
    * com.apple.dt.GitLabSelfHostBuiltInExtension/
    * com.apple.dt.IDECacheDeleteAppExtension/
    * com.apple.dt.XCDocumenter.XCDocumenterExtension/
    * com.apple.dt.XcodeBuiltInExtensions/
* ~/Library/Application Support/
    * CrashReporter/
        * lldb-rpc-server_**.plist
        * Simulator_**.plist
        * Xcode_**.plist
    * com.apple.sharedfilelist/
        * com.apple.LSSharedFileList.ApplicationRecentDocuments/com.apple.dt.xcode.sfl2
* ~/Library/Caches/
    * com.apple.dt.Xcode/ :hammer_pick: `rm -rf ~/Library/Caches/com.apple.dt.Xcode`
        * Cache.db
        * Cache.db-shm
        * Cache.db-wal
        * CachedDesktopImageScaled.tif
        * Downloads/
            * **.dvtdownloadableindex
            * com.apple.pkg.iPhoneSimulatorSDK**.dmg
        * fsCachedData/
        * WebKit
        * xcavatar.cache
        * XCAvatarImages
    * com.apple.dt.Xcode.sourcecontrol.Git/
        * Cache.db
        * Cache.db-shm
        * Cache.db-wal
    * com.apple.helpd/
        * Generated/
            * com.apple.dt.Xcode.help*8E3004b
            * com.apple.dt.Xcode.help*9A1004
            * com.apple.dt.Xcode.help*9F2000
            * com.apple.dt.Xcode.help*10B61
            * com.apple.dt.Xcode.help*10O45e
        * SDMHelpData/Other/
            * English/HelpSDMIndexFile/
                * com.apple.dt.Xcode.help*8E3004b
                * com.apple.dt.Xcode.help*9A1004
                * com.apple.dt.Xcode.help*9F2000
                * com.apple.dt.Xcode.help*10B61
                * com.apple.dt.Xcode.help*10O45e
            * Japanese/HelpSDMIndexFile/
                * com.apple.dt.Xcode.help*8E3004b
                * com.apple.dt.Xcode.help*9A1004
                * com.apple.dt.Xcode.help*9F2000
                * com.apple.dt.Xcode.help*10B61
                * com.apple.dt.Xcode.help*10O45e
* ~/Library/Developer/
    * CoreSimulator/Devices/ :hammer_pick: `xcrun simctl delete all unavailable devices` and `xcrun simctl erase all`
    * Shared/Documentation/DocSets/ :hammer_pick: `rm -rf ~/Library/Developer/Shared/Documentation/DocSets/*`
        * **.docset
    * Xcode/
        * Archives/ :hammer_pick: `rm -rf ~/Library/Developer/Xcode/Archives/*`
        * DerivedData/ :hammer_pick: `rm -rf ~/Library/Developer/Xcode/DerivedData/*`
        * DocumentationCache/ :hammer_pick: `rm -rf ~/Library/Developer/Xcode/DocumentationCache/*`
        * iOS Device Logs/ :hammer_pick: `rm -rf ~/Library/Developer/Xcode/iOS Device Logs/*`
        * iOS DeviceSupport/ :hammer_pick: `rm -rf ~/Library/Developer/Xcode/iOS DeviceSupport/*`
        * UserData/
    * XCPGDevices/
    * XCTestDevices/
* ~/Library/Preferences/
    * com.apple.dt.Xcode.plist
    * com.apple.dt.xcodebuild.plist
    * com.apple.FileMerge.plist
    * com.apple.ibtool.plist
    * com.apple.iphonesimulator.plist
* ~/Library/Saved Application State/
    * com.apple.dt.Xcode.savedState/
        * data.data
        * window_1.data
windows.plist
* ~/Library/MobileDevice/
    * Provisioning Profiles/**.mobileprovision

## /private/var
* /private/var/db/BootCaches/
    * **/
        * app.com.apple.FileMerge.playlist
        * app.com.apple.dt.Xcode.playlist
        * app.com.apple.iphonesimulator.playlist
* /private/var/folders/
    * tt/
        * **/
            * C/
                * com.apple.FileMerge/
                    * com.apple.metal/
                * com.apple.dt.Xcode/
                    * com.apple.metal/
                * com.apple.dt.Xcode.InstallCheckCache_CoreSim_17G2208_9F2000
                * com.apple.dt.Xcode.InstallCheckCache_CoreSim_17G2307_9F2000
                * com.apple.dt.Xcode.InstallCheckCache_MobileDevice_17G2208_9F2000
                * com.apple.dt.Xcode.InstallCheckCache_MobileDevice_17G2307_9F2000
                * com.apple.iphonesimulator/
                    * com.apple.metal/
            * T/
                * com.apple.dt.Xcode.InstallCheckCache_com.apple.pkg.MobileDeviceDevelopment_17G2307_10B61
                * com.apple.dt.Xcode.InstallCheckCache_CoreSim_17G2307_10A255
                * com.apple.dt.Xcode.InstallCheckCache_CoreSim_17G2307_10B61
                * com.apple.dt.Xcode.InstallCheckCache_MobileDevice_17G2307_10A255
                * com.apple.dt.Xcode.InstallCheckCache_MobileDevice_17G2307_10B61
                * com.apple.dt.XcodeBuiltInExtensions

# Containers Paths

## ~/Library
* ~/Library/Containers/
    * com.apple.dt.BitbucketHostBuiltInExtension/
        * Container.plist
        * Data/
    * com.apple.dt.BitbucketServerHostBuiltInExtension/
        * Container.plist
        * Data/
    * com.apple.dt.GitHubEnterpriseHostBuiltInExtension/
        * Container.plist
        * Data/
    * com.apple.dt.GitHubHostBuiltInExtension/
        * Container.plist
        * Data/
    * com.apple.dt.GitLabSelfHostBuiltInExtension/
        * Container.plist
        * Data/
    * com.apple.dt.IDECacheDeleteAppExtension/
        * Container.plist
        * Data/
    * com.apple.dt.XCDocumenter.XCDocumenterExtension/
        * Container.plist
        * Data/
    * com.apple.dt.XcodeBuiltInExtensions/
        * Container.plist
        * Data/

---

# Notes
* xcrun simctl
    * `xcrun simctl delete all unavailable devices` は既に利用出来なくなったデバイスを削除する。
    * `xcrun simctl erase all` は デバイスにインストールしたアプリや設定を削除する。
        *  Simulator.app/[Hardware]/[Erase All Content and Settings...] に相当する。
* com.apple.dt.Xcode.help*9F2000：`9F2000`はXcode.appの`ProductBuildVersion`です。