[BUG] `mo clean` didn't complete successfully
Describe the bug
After running this command, the arrow below is red, which probably means it did not run successfully.
Steps to reproduce
- Run command:
mo clean - Pet the cat
- See error
Expected behavior
It should be completed successfully
Debug logs
Please run the command with --debug flag and paste the output here:
mo clean --debug
Debug output
Clean Your Mac
β Use --dry-run to preview, --whitelist to manage protected paths
β Admin access granted
β Apple Silicon | Free space: 95Gi
β Whitelist: 11 core patterns active
β€ Deep system
[DEBUG] Finding (sudo) in /Library/Caches: *.cache (age: 7d, type: f)
[DEBUG] Finding (sudo) in /Library/Caches: *.tmp (age: 7d, type: f)
[DEBUG] Finding (sudo) in /Library/Caches: *.log (age: 7d, type: f)
β System caches
[DEBUG] Finding (sudo) in /private/tmp: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/tmp: * (age: 7d, type: f)
β System temp files
[DEBUG] Finding (sudo) in /Library/Logs/DiagnosticReports: * (age: 7d, type: f)
β System crash reports
[DEBUG] Finding (sudo) in /private/var/log: *.log (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/log: *.gz (age: 7d, type: f)
β System logs
[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Special: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Persist: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/db/DiagnosticPipeline: * (age: 7d, type: f)
β System diagnostic logs
[DEBUG] Finding (sudo) in /private/var/db/powerlog: * (age: 7d, type: f)
β Power logs
β Nothing to clean
β€ User essentials
[DEBUG] Cleaning: User app cache (19 items)
[DEBUG] Cleaning: User app logs (5 items)
[DEBUG] Cleaning: Trash (0 items)
| Scanning 1 external volume(s)...[TIMEOUT] Shell fallback (1s): mount
β Nothing to clean
β€ Finder metadata
β Finder metadata Β· whitelist protected
β€ macOS system caches
[DEBUG] Cleaning: Saved application states (0 items)
[DEBUG] Cleaning: Photo analysis cache (0 items)
[DEBUG] Cleaning: Apple ID cache (0 items)
[DEBUG] Cleaning: WebKit network cache (0 items)
[DEBUG] Cleaning: Diagnostic reports (0 items)
[DEBUG] Cleaning: QuickLook thumbnails (0 items)
[DEBUG] Cleaning: QuickLook cache (0 items)
[DEBUG] Cleaning: Icon services cache (0 items)
[DEBUG] Cleaning: CloudKit cache (0 items)
[DEBUG] Cleaning: Safari incomplete downloads (0 items)
[DEBUG] Cleaning: Chrome incomplete downloads (0 items)
[DEBUG] Cleaning: Partial incomplete downloads (0 items)
[DEBUG] Cleaning: Autosave information (0 items)
[DEBUG] Cleaning: Identity caches (0 items)
[DEBUG] Cleaning: Siri suggestions cache (0 items)
[DEBUG] Cleaning: Calendar cache (0 items)
[DEBUG] Cleaning: Address Book photo cache (0 items)
[DEBUG] Cleaning: Recent items preferences (0 items)
~ 12s
β―
Environment
Please run mo update to ensure you are on the latest version, then paste the output of mo --version below:
Mole version 1.15.1
macOS: 26.2
Architecture: arm64
Kernel: 25.2.0
SIP: Enabled
Disk Free: 95Gi
Install: Manual
Shell: /bin/zsh
Additional context
Installed from Homebrew
Hi @Lemonawa,
This timeout issue has been fixed in version 1.15.2.
Root cause: The scan_external_volumes function was using run_with_timeout 1 mount to verify volume mount status. On systems with many mount points or network filesystems, the mount command could exceed the 1-second timeout, causing the failure you observed.
Fix: Replaced the slow mount command with a lightweight directory accessibility check ([[ -d "$volume" && -r "$volume" ]]). This is both faster and more reliable, as the volume was already validated earlier in the scan.
Please update to the latest version: mo update
I upgraded to the latest version, but this command still failed to execute successfully.
Debug output
Clean Your Mac
β Use --dry-run to preview, --whitelist to manage protected paths
β Admin access granted
β Apple Silicon | Free space: 95Gi
β Whitelist: 11 core patterns active
β€ Deep system
[DEBUG] Finding (sudo) in /Library/Caches: *.cache (age: 7d, type: f)
[DEBUG] Finding (sudo) in /Library/Caches: *.tmp (age: 7d, type: f)
[DEBUG] Finding (sudo) in /Library/Caches: *.log (age: 7d, type: f)
β System caches
[DEBUG] Finding (sudo) in /private/tmp: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/tmp: * (age: 7d, type: f)
β System temp files
[DEBUG] Finding (sudo) in /Library/Logs/DiagnosticReports: * (age: 7d, type: f)
β System crash reports
[DEBUG] Finding (sudo) in /private/var/log: *.log (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/log: *.gz (age: 7d, type: f)
β System logs
[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Special: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Persist: * (age: 7d, type: f)
[DEBUG] Finding (sudo) in /private/var/db/DiagnosticPipeline: * (age: 7d, type: f)
β System diagnostic logs
[DEBUG] Finding (sudo) in /private/var/db/powerlog: * (age: 7d, type: f)
β Power logs
[DEBUG] Finding (sudo) in /private/var/db/reportmemoryexception/MemoryLimitViolations: * (age: 30d, type: f)
β Memory exception reports
| Cleaning diagnostic trace logs...[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Persist: *.tracev3 (age: 30d, type: f)
[DEBUG] Finding (sudo) in /private/var/db/diagnostics/Special: *.tracev3 (age: 30d, type: f)
β System diagnostic trace logs
[DEBUG] Checking core symbolication cache...
[DEBUG] Core symbolication cache section completed
[DEBUG] Checking Aliyun security components...
[DEBUG] Aliyun security components check completed, cleaned: 0
~ 8s
β―
@Lemonawa Thanks for the detailed bug report! I've identified and fixed the issue.
Root Cause: The script uses set -euo pipefail, so any command failure causes immediate exit. The spinner cleanup functions had several echo/printf commands without || true error handling, which could fail silently in certain terminal environments and cause the script to exit unexpectedly.
Fix: Added || true to terminal output commands in spinner functions to prevent script termination on I/O errors.
Resolution: Fixed in version 1.15.4. Please run mo update to get the latest version and let me know if this resolves the issue. Thanks!
Iβve also encountered the same issue even after updating to version 1.15.4.
Additionally, it hasnβt been released through GitHub, right? I canβt update it using mo update, but I can use HomeBrew.
@Lemonawa There may be a delay in updates, try mo update again. or brew update
Yes, I confirm that it failed at the same position even after updating to version 1.15.4.
@Lemonawa Keep trying 1.15.5, I have removed this problematic piece of code.
It gets further for me but still fails.
Clean Your Mac
β Use --dry-run to preview, --whitelist to manage protected paths
β Admin access granted
β Apple Silicon | Free space: 207Gi
β Whitelist: 12 core patterns active
β€ Deep system
β System caches
β System temp files
β System crash reports
β System logs
β System diagnostic logs
β Power logs
β Memory exception reports
β System diagnostic trace logs
β Nothing to clean
β€ User essentials
β User app cache 251 items (16.66GB)
β User app logs 40 items (48.9MB)
β€ Finder metadata
β Finder metadata Β· whitelist protected
β€ macOS system caches
β Saved application states 15 items (180KB)
β Partial incomplete downloads 2 items (41.2MB)
~ took 1m1s
β― echo $?
1
β€ macOS system caches
[DEBUG] Cleaning: Saved application states (0 items)
[DEBUG] Cleaning: Photo analysis cache (0 items)
[DEBUG] Cleaning: Apple ID cache (0 items)
[DEBUG] Cleaning: WebKit network cache (0 items)
[DEBUG] Cleaning: Diagnostic reports (0 items)
[DEBUG] Cleaning: QuickLook thumbnails (0 items)
[DEBUG] Cleaning: QuickLook cache (0 items)
[DEBUG] Cleaning: Icon services cache (0 items)
[DEBUG] Cleaning: CloudKit cache (0 items)
[DEBUG] Cleaning: Safari incomplete downloads (0 items)
[DEBUG] Cleaning: Chrome incomplete downloads (0 items)
[DEBUG] Cleaning: Partial incomplete downloads (0 items)
[DEBUG] Cleaning: Autosave information (0 items)
[DEBUG] Cleaning: Identity caches (0 items)
[DEBUG] Cleaning: Siri suggestions cache (0 items)
[DEBUG] Cleaning: Calendar cache (0 items)
[DEBUG] Cleaning: Address Book photo cache (0 items)
[DEBUG] Cleaning: Recent items preferences (0 items)
It works for me when I use iTerm2. Which terminal are you using?
Ghostty
For me, granting full disk access to my terminal (Warp, in this case) solved the issue.
@samchouse @Vader-7 @Lemonawa @Shakura404 Thank you very much for your patience in debugging me. At present, I continue to repair a thorough version. Please update to the latest version 1.15.8 to see if it's okay. If it's not good, please tell me - debug log