Mac 系统占用100G+解决办法(详细步骤

Mac 系统占用100G+解决办法(详细步骤~/Library/Developer/Xcode/iOSDeviceLogs清空Products~/Library/Developer/Xcode/ProductsXcode12及之后版本还有3个占用内存的文件分别是:第一名:iOS.simruntime10.29 GB(iOS日常开发需要使用,勿删)第二名:watchOS.simruntime7.05 GB(不做watch开发可以删除)第三名:tvOS.simruntime5.39 G

大家好,欢迎来到IT知识分享网。

~/Library/Developer/Xcode/iOS Device Logs

  • 清空 Products

~/Library/Developer/Xcode/Products

  • Xcode 12 及之后版本 还有3个占用内存的文件分别是:

第一名:iOS.simruntime 10.29 GB (iOS 日常开发需要使用,勿删)

第二名:watchOS.simruntime 7.05 GB (不做 watch 开发可以删除)

第三名:tvOS.simruntime 5.39 GB (不做 tv 开发可以删除)

// iOS.simruntime 路径(勿删)

Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS.simruntime

// watchOS.simruntime 路径(可选)

Xcode.app/Contents/Developer/Platforms/WatchOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/watchOS.simruntime

// tvOS.simruntime 路径(可选)

Xcode.app/Contents/Developer/Platforms/AppleTVOS.platform/Library/Developer/CoreSimulator/Profiles/Runtimes/tvOS.simruntime

我这里删掉这几个文件之后,直接变成 20G 不到,本来还想试试别的方法的,看来用不上了。

Mac 系统占用100G+解决办法(详细步骤

[](()二、可视化工具

  • 不想用命令行,也有可视化工具 [OmniDiskSweeper](()

image.png

[](()三、通过命令行定位

  • 执行命令,输入密码

// (推荐)两个命令输出的文件都一样,只是这个会按文件排下序,内存文件都在一块方便看

$ sudo du -sh *|sort -nr

或者

$ sudo du -sh *

幸好啊,我在做上面清理 Xcode 操作之前有先执行过这个命令,所以可以看看输出,我的 Library 文件有超过 90G+的,我这边就是上面 Xcode 缓存文件占用了,删掉之后就小了。

0B Applications

31G Desktop

160K Documents

27M Downloads

du: Library/Application Support/MobileSync: Operation not permitted

du: Library/Application Support/CallHistoryTransactions: Operation not permitted

du: Library/Application Support/com.apple.TCC: Operation not permitted

du: Library/Application Support/CallHistoryDB: Operation not permitted

du: Library/IdentityServices: Operation not permitted

du: Library/Messages: Operation not permitted

du: Library/HomeKit: Operation not permitted

du: Library/Mail: Operation not permitted

du: Library/Safari: Operation not permitted

du: Library/Suggestions: Operation not permitted

du: Library/Containers/com.apple.VoiceMemos: Operation not permitted

du: Library/Containers/com.apple.Home: Operation not permitted

du: Library/Containers/com.apple.Safari: Operation not permitted

du: Library/Containers/com.apple.iChat: Operation not permitted

du: Library/Containers/com.apple.mail: Operation not permitted

du: Library/Containers/com.apple.stocks: Operation not permitted

du: Library/PersonalizationPortrait: Operation not permitted

du: Library/Metadata/CoreSpotlight: Operation not permitted

du: Library/Metadata/com.apple.IntelligentSuggestions: Operation not permitted

du: Library/Cookies: Operation not permitted

du: Library/Caches/CloudKit/com.apple.Saf 《大厂前端面试题解析+Web核心总结学习笔记+企业项目实战源码+最新高清讲解视频》无偿开源 徽信搜索公众号【编程进阶路】 ari: Operation not permitted

du: Library/Caches/com.apple.Safari: Operation not permitted

du: Library/Caches/com.apple.Safari.SafeBrowsing: Operation not permitted

92G Library

4.0K Movies

17M Music

25M Parallels

2.5M Pictures

0B Postman

0B Public

220K Sites

1000K WeChatProjects

36M node_modules

132K package-lock.json

现在我们已经知道是这个 Library 文件夹里面内存太大了,但是我们也不能直接删除 Library 文件夹,毕竟是系统文件,估计也没权限,莫慌,我们只需要进入这个你看着占用大内存的文件夹里面继续用命令定位

$ cd ~/Library

进入文件夹之后继续执行上面内存检查命令

// (推荐)两个命令输出的文件都一样,只是这个会按文件排下序,内存文件都在一块方便看

$ sudo du -sh *|sort -nr

或者

免责声明:本站所有文章内容,图片,视频等均是来源于用户投稿和互联网及文摘转载整编而成,不代表本站观点,不承担相关法律责任。其著作权各归其原作者或其出版社所有。如发现本站有涉嫌抄袭侵权/违法违规的内容,侵犯到您的权益,请在线联系站长,一经查实,本站将立刻删除。 本文来自网络,若有侵权,请联系删除,如若转载,请注明出处:https://yundeesoft.com/15478.html

(0)

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注

关注微信