Home/Guides/How to check logs and disk space on a remote Mac mini

How to check logs and disk space on a remote Mac mini

Updated · airankrush

What this guide covers

When you finish, you know what is using the disk and how to clean up after each tool, and you have an automatic reminder. You need: basic terminal skills.

Steps

  1. Why you need to act earlier on a rented machine

    When the disk on your own computer fills up, at worst you plug in a drive or boot into recovery mode. Neither is possible on a remote machine: built-in storage cannot be increased during the rental term, an external drive has to be arranged with support first, and a full disk can make both the system and the remote access software misbehave, at which point even getting in to clean up is hard. So do not wait for an alert. Keep a fixed margin free and check regularly.

  2. Check the total, then find the large directories

    df -h / shows overall used and free space. Then look only inside your own user directory:

    du -sh ~/* ~/.[!.]* 2>/dev/null | sort -h | tail -20
    du -sh ~/Library/Caches/* 2>/dev/null | sort -h | tail -20

    The first command lists the twenty largest items in your user directory (including hidden directories), and the second shows app caches. Nearly all the usage is in these two places, plus the directories that the developer tools below keep for themselves.

  3. Clean up tool by tool, using each tool's own command

    Do not delete a tool's data directory by hand. The official commands are safer:

    • Homebrew: brew cleanup
    • Containers: docker system df to inspect, docker system prune to clean up
    • uv: uv cache clean
    • Playwright: npx playwright uninstall --all
    • Ollama: ollama ls to inspect, ollama rm <model> to delete
    • Xcode: ~/Library/Developer/Xcode/DerivedData holds build artifacts that can be rebuilt

    While you are at it, uninstall the Node and Python versions you no longer use from each version manager.

  4. Rotate your own logs

    Logs from unattended jobs only ever grow. Keep logs together in one directory (for example ~/logs), name them by day or split them periodically, and delete old ones on a schedule:

    find ~/logs -name '*.log' -mtime +14 -delete

    This command deletes log files older than fourteen days; change the number of days to suit you. Run it once without -delete first to confirm that what it lists really should be deleted.

  5. Which logs to read when something goes wrong

    For your own jobs, read your own log files; tail -n 200 followed by the file path shows the end. App crash reports are in ~/Library/Logs/DiagnosticReports, and you can view them with the Console app in the remote desktop. When you need support, send the time of the error, the program name and the error text. Mask any secrets and business content in the logs first.

  6. Places you should not clean

    Do these checks only inside your own user directory. /Library, /System, /private/var and the directories of other accounts may hold files and logs belonging to the platform's management components and the remote access software. Leave them alone however large they look. Also do not use cleaner apps that remove login items, profiles and system extensions in bulk. They may treat the platform's management configuration and remote access components as junk and remove them, leaving the machine unreachable.

  7. Add an automatic reminder

    Write a small script that takes the usage percentage from df -h / and, when it exceeds a threshold you set, sends a message through your own notification channel (an email API or a chat bot webhook). Then run it once a day with a user-level scheduled job. The notification channel is your own, and what goes out is an ordinary outbound request, so no change to the network configuration is needed. For more ideas on monitoring while unattended, see how to monitor unattended tasks.

FAQ

The disk is so full that even the remote desktop lags. What should I do?

First delete one or two large directories that you are sure can be rebuilt (build artifacts, models, container images) to free some space, then do a careful cleanup. If you can no longer connect, contact Contact support with the machine name, what you are seeing and the time. Do not restart it over and over.

"System Data" takes up a lot of space. Can I clear it?

That item is a mix of system files, caches and snapshots, and we do not recommend handling it by hand. Clear what you can in your own directories first. If it still looks abnormal, ask support to take a look.

The disk really is too small. Can it be increased?

Built-in storage cannot be replaced during the rental term. External storage adds storage space only, not memory, and the port, capacity and arrangements have to be confirmed with support first. You can also switch to a larger configuration on the plans page.

I deleted my own files by mistake while cleaning up. Can they be recovered?

You back up your own data, and the platform keeps no copies of your files. This is also why you should push code often and sync your output to your own storage.

Pricing and availability: see the plans page · Help center (中文) · Refund policy (中文) · Telegram Contact support

Back to home · All guides