Custom Disk Clean Targets
Advanced Cleanup
OneMenu allows advanced users to define custom cleanup targets. This feature is powerful and should be used with caution, as it allows for the automatic deletion of files in specified paths.
Supported Path Formats
When defining paths for custom cleanup targets, you can use several formats:
- Absolute paths: Must start with a forward slash.
/Library/Caches/SomeApp/Logs - Home directory: You can use the tilde character to refer to your home folder.
~/Library/Caches/MyApp - Wildcards: You can use the asterisk (
*) to match any string in a file or directory name.~/Downloads/*.tmp - Recursive wildcards (
**) are not supported, to prevent accidental data loss and missconfiguration.
Validation Rules
To prevent accidental deletion of critical system files, OneMenu enforces several validation rules on custom paths.
Strictly Blocked Paths
The following paths and their subdirectories are strictly protected and cannot be used as cleanup targets:
- File system root (
/) /System/bin/sbin/usr/etc/var/private
Restricted Areas
Some areas of the file system are restricted to prevent deleting important user or system data. Paths within these folders must be at least 4 levels deep to be considered safe:
/Library/Applications/Users/Volumes
Note: /Users/username/Library/Caches is allowed (4 levels deep), while /Users/username/Documents is blocked (3 levels deep) to prevent accidental data loss.
Adding a Custom Target
To add a custom cleanup target:
- Open OneMenu Preferences.
- Go to the Disk Clean section.
- Click the + button in the Custom Cleanup Targets section.
- Enter a name for the target, add one or more paths, and choose a category.
- Click Add to save the target.