APFS local snapshots OR why is free space on my Mac getting smaller from day to day?

Josef Glatz
Productiveness
Published in
1 min readSep 10, 2020

--

TL’DR; I have to delete local snapshots of my Mac’s on a regular basis. Don’t know if this is “normal”.

The manual way

Executing tmutil listlocalsnapshotdates / lists local APFS filesystem snapshots. In my case, multiple snapshots are created. Disclaimer: I didn’t activated this feature. Just updated my mac to Mojave and switched to APFS filesystems.

com.apple.TimeMachine.2020–09–06–094628
com.apple.TimeMachine.2020–09–08–175758
com.apple.TimeMachine.2020–09–08–190250
com.apple.TimeMachine.2020–09–08–200116
com.apple.TimeMachine.2020–09–08–205815
com.apple.TimeMachine.2020–09–08–220112
com.apple.TimeMachine.2020–09–08–230510
com.apple.TimeMachine.2020–09–09–010424
com.apple.TimeMachine.2020–09–09–030053
com.apple.TimeMachine.2020–09–09–040138
com.apple.TimeMachine.2020–09–09–045854
com.apple.TimeMachine.2020–09–09–055827
com.apple.TimeMachine.2020–09–09–065759
com.apple.TimeMachine.2020–09–09–090525
com.apple.TimeMachine.2020–09–09–100053
com.apple.TimeMachine.2020–09–09–105808
com.apple.TimeMachine.2020–09–09–115835
com.apple.TimeMachine.2020–09–09–130129
com.apple.TimeMachine.2020–09–09–135801
com.apple.TimeMachine.2020–09–09–160500
com.apple.TimeMachine.2020–09–09–173416

At this point I have only 3,6GB space left.

You can delete each of the snapshots separately: tmutil deletelocalsnapshots 2020-09-06-094628 and so on…

At this point I have 56GB space left on the filesystem 😊.

The semi-automatical way (for me)

I’m running a simple script which clears all snapshots of my filesystems on my Mac. I have the root filesystem “/” and another case-sensitive filesystem mounted on “/Volumes/CS” (CS for case-sensitive) where all (web) development projects are.

Whenever free space is limited on my mac I run the following bash script:

I hope someone can benefit from this post. Clap if so 😌

--

--