Skip to content

Instantly share code, notes, and snippets.

@craftgear
Last active October 25, 2020 00:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save craftgear/11f2234525e3e9dab04867b199f5eced to your computer and use it in GitHub Desktop.
Save craftgear/11f2234525e3e9dab04867b199f5eced to your computer and use it in GitHub Desktop.
macOSのパージ可能領域を掃除するワンライナー
#!/bin/sh
# こちらのブログを参考にしました https://dafuku2.blogspot.com/2019/09/macos.html
# TimeMachineが使っている分しか消せないので、パージ可能領域は完全になくなりません。
# 結構時間がかかります。
tmutil listlocalsnapshots / | rg -e '\d{4}-\d{2}-\d{2}-\d{6}' -o | xargs -I date tmutil deletelocalsnapshots date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment