Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
T treasure
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 12
    • Issues 12
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • External wiki
    • External wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • FE
  • treasure
  • Issues
  • #46

Closed
Open
Created Sep 15, 2021 by JayChen@JayChenOwner

mac电脑,删除的文件越多,反而内存越少

原因

开启了快照功能,删除之后会被存储为一个快照,从而占用了内存

解决方法

打开“终端”输入如下代码

chenyingjies-MacBook-Pro-2:~ chenyingjie$ sudo tmutil listlocalsnapshots /

你可以看到

com.apple.TimeMachine.2021-09-14-165739
com.apple.TimeMachine.2021-09-14-175751
com.apple.TimeMachine.2021-09-14-195814
com.apple.TimeMachine.2021-09-15-103132

接下逐步删除除了最近一个意外的其他所有

chenyingjies-MacBook-Pro-2:~ chenyingjie$ tmutil deletelocalsnapshots 2021-09-14-165739

如果出现如下显示,你会发现磁盘空间已经空出来了不少

Deleted local snapshot '2017-12-18-093234'

删除完其他所有快照之后,可以再次输入如下命令检测

chenyingjies-MacBook-Pro-2:~ chenyingjie$ sudo tmutil listlocalsnapshots /
Edited Sep 15, 2021 by JayChen
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking