---
title: "Clear System Data on Mac with Terminal (safe commands)"
description: "Safe Terminal commands to find and clear System Data on a Mac: thin snapshots, find the biggest folders, and clear app caches and developer files."
url: https://tidymac.space/guides/clear-system-data-mac-terminal/
updated: 2026-10-16
---

[Home](/) [Guides](/guides/) Clear System Data on Mac with Terminal (safe commands)

# Clear System Data on your Mac with Terminal

Safe Terminal commands to find and clear System Data on a Mac: thin snapshots, find the biggest folders, and clear app caches and developer files.

7 min readUpdated October 16, 2026By the Tidy Mac team

Short answer

Use Terminal to find what is big first, then clear only that: tmutil thins Time Machine local snapshots, du lists the biggest folders, and each developer tool has its own cleanup command. Avoid deleting anything under /System, /Library or /private by hand, and never run rm -rf on a folder you haven’t identified.

The steps

1.  List and thin Time Machine local snapshots with tmutil.
2.  Find the biggest folders in your Library with du.
3.  Clear caches of closed apps by moving them to the Trash.
4.  Clean developer files with each tool’s own command.

## 1\. Snapshots

```
tmutil listlocalsnapshots /
sudo tmutil thinlocalsnapshots / 999999999999 4
```

## 2\. Find the biggest folders

```
du -sh ~/Library/* 2>/dev/null | sort -h | tail -15
du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -15
```

## 3\. Move a cache to the Trash (recoverable)

Quit the app first, then (replace the name with the folder you found):

```
mv ~/Library/Caches/com.example.app ~/.Trash/
```

Moving to the Trash instead of `rm` means you can put it back.

## 4\. Developer files, with their own tools

```
xcrun simctl delete unavailable     # old iOS simulators
rm -rf ~/Library/Developer/Xcode/DerivedData/*   # Xcode rebuilds this
docker system prune                 # unused Docker data
brew cleanup                        # old Homebrew downloads
ollama rm <model>                   # a local AI model
```

![](/img/brand/tidy-128.png)

### Let Tidy Mac do this for you

See every part of your storage explained, and clear junk to the Trash with Undo. $9.99 once, 2 Macs.

[Download](/download/TidyMac.dmg) [Buy for $9.99 once](/buy/)

## What not to touch

`/System`, `/Library`, `/private/var` (except via the commands above), `~/Library/Mobile Documents` (iCloud Drive), Mail and Messages folders, and Keychains.

Prefer clicking? The free [cleanup commands tool](/tools/mac-cleanup-commands/) builds these for you. Tidy Mac's Clean screen sorts caches and developer files into Safe to clear, Worth a look and Kept, and moves what you pick to the Trash, with Undo in History. Snapshots, simulator devices and Ollama models stay with the commands above.

## Keep reading

[How to check disk space on a Mac in Terminal](/guides/check-disk-space-mac-terminal/)[Mac cleanup command builder](/tools/mac-cleanup-commands/)[How to clear System Data on macOS 27 Golden Gate without breaking anything](/guides/clear-system-data-macos-27/)[Clear System Data on macOS Tahoe](/guides/clear-system-data-macos-tahoe/)[The best Mac cleaners in 2026, honestly compared](/guides/best-mac-cleaner/)[Is CleanMyMac worth it?](/guides/is-cleanmymac-worth-it/)

Share:[X](https://x.com/intent/post?text=Clear%20System%20Data%20on%20your%20Mac%20with%20Terminal&url=https%3A%2F%2Ftidymac.space%2Fguides%2Fclear-system-data-mac-terminal%2F)[Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Ftidymac.space%2Fguides%2Fclear-system-data-mac-terminal%2F&title=Clear%20System%20Data%20on%20your%20Mac%20with%20Terminal)[Hacker News](https://news.ycombinator.com/submitlink?u=https%3A%2F%2Ftidymac.space%2Fguides%2Fclear-system-data-mac-terminal%2F&t=Clear%20System%20Data%20on%20your%20Mac%20with%20Terminal)[LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Ftidymac.space%2Fguides%2Fclear-system-data-mac-terminal%2F)

#### On this page

[1\. Snapshots](#1-snapshots)[2\. Find the biggest folders](#2-find-the-biggest-folders)[3\. Move a cache to the Trash (recoverable)](#3-move-a-cache-to-the-trash-recoverable)[4\. Developer files, with their own tools](#4-developer-files-with-their-own-tools)[What not to touch](#what-not-to-touch)

**Tidy Mac**

See this on your own Mac in under a minute. $9.99 once, 2 Macs.

[Download](/download/TidyMac.dmg)
