tmpreaper
« Back to VersTracker
Description:
Clean up files in directories based on their age
Type: Formula  |  Tracked Since: Dec 28, 2025
Links: Homepage  |  formulae.brew.sh
Category: System utilities
Tags: cleanup tmp filesystem maintenance utility
Install: brew install tmpreaper
About:
Tmpreaper is a utility that recursively deletes files based on their age, specifically their atime (access time). It is designed to automatically clean up temporary directories and other locations where old files can accumulate, helping to free up disk space. The tool offers fine-grained control over its operation, including various time thresholds and safety mechanisms to prevent accidental data loss.
Key Features:
  • Deletes files based on access time (atime), modification time (mtime), or change time (ctime)
  • Supports recursive directory traversal with configurable depth
  • Includes safety features like testing mode and age-based thresholds
  • Allows for pattern matching to include or exclude specific files
Use Cases:
  • Automated cleanup of /tmp and /var/tmp directories on servers
  • Managing log rotation and preventing log files from consuming all disk space
  • Periodic purging of user-specific cache or temporary data directories
Alternatives:
  • find – The `find` command is a more general-purpose tool that can replicate tmpreaper's functionality with more complex scripts, but tmpreaper is purpose-built and simpler for this specific task.
  • logrotate – Logrotate is specialized for managing log files, offering features like compression and mailing. Tmpreaper is better for general-purpose temporary file cleanup based on access time.
Version History
Detected Version Rev Change Commit
Sep 12, 2024 9:21pm 0 VERSION_BUMP 7b1388a2