
[Update]CleanMyLogs
<Cleanthetahoe />
![[Update] CleanMyLogs](/uploads/1769672865447-image20260129144625947.png)
Overview
A lightweight, native macOS menu bar utility designed to monitor and clean up system junk, specifically targeting logs, caches, and developer artifacts. Built with SwiftUI and Swift Package Manager.
Development Process
Features
- Menu Bar Access: Unobtrusive utility that lives in your menu bar.
- Monitoring: Real-time calculation of directory sizes for Logs, Caches, Xcode, and more.
- Visual Feedback:
- Progress bar showing usage relative to your set limit.
- Blinking Icon: The menu bar icon blinks when your junk size exceeds the limit.
- Interactive Labels: Click on any category name to instantly open that folder in Finder.
- Safe Cleaning: Selective cleaning of specific categories.
- Automation:
- Auto-Scan: Efficiently checks sizes every 60 seconds (background priority, zero SSD impact).
- Global Hotkey: Trigger cleaning instantly with
Cmd + Ctrl + Shift + C. - Launch at Login: Automatically starts with your system.
Privacy & Permissions
Transparency is key. This application accesses specific directories on your Mac to calculate sizes and perform cleaning operations. It does not collect, transmit, or share any personal data.
Accessed Directories
CleanMyLogs requires Full Disk Access to function correctly (specifically for the Trash and Caches). It operates only on the following user directories:
| Category | Path | Action |
|---|---|---|
| System Logs | ~/Library/Logs | Deletes all log files. |
| App Caches | ~/Library/Caches | Deletes application cache files. |
| Installers | ~/Downloads | Scans for & deletes .dmg and .pkg files only. |
| Xcode Data | ~/Library/Developer/Xcode/DerivedData | Deletes Xcode build artifacts. |
| Xcode Archives | ~/Library/Developer/Xcode/Archives | Deletes old app archives. |
| Homebrew | ~/Library/Caches/Homebrew | Deletes cached Homebrew packages. |
| Trash | ~/.Trash | Permanently deletes all items in the Trash. |
Note: For "Time Machine Snapshots", the app uses the
tmutilcommand which requires Administrator privileges (you will be prompted for your password).
How to Use
Settings & Configuration
- Notification Limit: Set your preferred threshold (1GB, 2GB, 5GB, 10GB). You'll get a notification if junk exceeds this size.
- Global Hotkey: hardcoded to
Cmd + Ctrl + Shift + Cfor safety and prevention of conflicts. - Persistence: Settings are saved locally in
~/.config/CleanMyLogs/settings.json.
Recent Activity
[update] change notification policy and add script to build to DMG file
1/30/2026by Đinh Trung Kiên
84c1f8c