Skip to main content

A cross-platform utility for cleaning cache and temporary files

Project description

Smart Cache Cleaner

Smart Cache Cleaner is a cross-platform Python utility for efficiently managing and cleaning cache and temporary files.

Features

  • Smart scanning of common cache and temp directories
  • Customizable file filtering by size and age
  • Secure deletion with file integrity checks
  • Memory-efficient batch processing
  • Detailed logging and verbose output options
  • Cross-platform support (Windows, macOS, Linux)
  • Interactive command-line interface with file-by-file decision making
  • Summary of files by extension before deletion

Installation

You can install Smart Cache Cleaner directly from PyPI:

pip install smart-cache-cleaner

Usage

After installation, you can run Smart Cache Cleaner from anywhere in your terminal:

smart-cache-cleaner [options]

Available options:

  • -d or --directory: Specify a custom directory to scan
  • -s or --min-size: Minimum file size to consider (in bytes)
  • -a or --max-age: Maximum file age to consider (in days, 0 for no limit)
  • -y or --yes: Skip confirmation for deletion
  • -v or --verbose: Increase output verbosity

Interactive Prompts

During the scanning process, you will be prompted for each file:

  • y: Yes, delete this file
  • n: No, skip this file
  • q: Quit the scanning process

You can use the -y option to skip these prompts and delete all matched files automatically.

Example:

smart-cache-cleaner -d /path/to/custom/directory -s 1000000 -a 30

This command would scan the specified directory, only considering files larger than 1 MB and not older than 30 days.

Safety Features

Smart Cache Cleaner includes several safety features to protect your system and data:

  • File hash verification before deletion to ensure file integrity
  • Symlink protection to prevent accidental deletion of linked files
  • Maximum directory depth limit to prevent infinite recursion
  • Memory usage monitoring to prevent excessive memory consumption
  • Batch processing to handle large directories efficiently

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Disclaimer

While Smart Cache Cleaner is designed with safety in mind, please use it at your own risk. Always ensure you have backups of important data before performing any cleanup operations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart-cache-cleaner-0.2.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_cache_cleaner-0.2.0-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file smart-cache-cleaner-0.2.0.tar.gz.

File metadata

  • Download URL: smart-cache-cleaner-0.2.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for smart-cache-cleaner-0.2.0.tar.gz
Algorithm Hash digest
SHA256 54a9df5a13b9e07056b059465bbc1521f81c40a41801295e844d16060969da46
MD5 404a7f4a03ce3eaf827365498f9b8fae
BLAKE2b-256 49cb68861cf3920f19d7440a53c082617e0345f07d1f08c02aef9a3f974fcf96

See more details on using hashes here.

File details

Details for the file smart_cache_cleaner-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_cache_cleaner-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 279937754f9d3662ef613bb2d1067f73ae4751e5bff9c587b12cb770da104e14
MD5 2c49c2a7f16aa73931006adb50f91de7
BLAKE2b-256 07eb2eefbf0a3fdba2998dcee4e9d99cf383b2ca73d529aeffcd30ca4c5e43e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page