Clean your system with the precision of an otter and the power of Python.
OtterClean is an open-source, terminal-based system cleanup and optimization tool designed for command-line enthusiasts. It provides a user-friendly Terminal User Interface (TUI) for various system maintenance tasks, including Docker management, cache cleaning, and disk usage analysis.
- Comprehensive system cleanup
- Docker management and cleanup
- Application and system cache cleaning
- Log file management
- Disk usage analysis
- User-friendly Terminal User Interface (TUI)
- Verbose mode for detailed operation information
- Logging system for tracking operations and errors
otterclean/
├── requirements.txt # List of project dependencies
├── setup.py # Script for installing the project
└── otterclean/
├── init.py # Package initialization
├── main.py # Main entry point of the application
├── version.py # Version information
├── config/
│ ├── init.py # Config package initialization
│ ├── colors.py # Color definitions for UI
│ └── settings.py # Application settings and constants
├── features/
│ ├── init.py # Features package initialization
│ ├── analysis.py # Disk usage analysis functions
│ ├── browser_cleanup.py # Browser cache cleaning functions
│ ├── cleanup.py # General cleanup functions
│ ├── command_line_support.py # CLI support functions
│ ├── docker_management.py # Docker-related cleanup functions
│ ├── privacy_protection.py # Privacy protection features
│ ├── reporting.py # Report generation functions
│ ├── secure_delete.py # Secure file deletion functions
│ └── system.py # System-related cleanup functions
├── logs/ # Directory for storing log files
├── tests/ # Directory for unit tests
├── ui/
│ ├── init.py # UI package initialization
│ ├── components.py # Reusable UI components
│ ├── details.py # Details display functionality
│ ├── file_browser.py # File browser implementation
│ ├── layout.py # Overall UI layout management
│ ├── menu.py # Menu implementation
│ ├── ui_components.py # Additional UI components
│ └── sections/
│ ├── details_section.py # Details section of the UI
│ ├── footer_section.py # Footer section of the UI
│ └── menu_section.py # Menu section of the UI
└── utils/
├── init.py # Utils package initialization
├── command_runner.py # Utility for running system commands
├── file_system.py # File system utility functions
└── progress.py # Progress bar implementations
- Python 3.7 or higher
- pip (Python package manager)
-
Clone the repository:
git clone https://github.com/yourusername/otterclean.git cd otterclean
-
Create and activate a virtual environment:
python3 -m venv venv source venv/bin/activate
-
Install the required dependencies:
pip install -r requirements.txt
-
Install the package:
pip install .
Run the program with:
otterclean
Use the arrow keys to navigate the menu and press Enter to select an option.
-v
or--verbose
: Enable verbose mode for detailed operation information-h
or--help
: Display help information and available command-line options
Example:
otterclean --verbose
- Comprehensive Docker Cleanup
- Remove Unused Docker Images
- Remove Stopped Containers
- Remove Unused Docker Volumes
- Clean Docker Build Cache
- Clean Application Cache
- Clean User Logs
- Clean System Logs
- Clean System Cache
- Clean All System Caches
- Disk Usage Analysis
- Clean Selected Application Caches
- Privacy Protection
- Exit
OtterClean now includes a logging system that records important events and errors during operation. Log files are stored in the logs
directory within the project folder. The default log file is named otter_clean.log
.
To view the logs:
cat logs/otter_clean.log
We welcome contributions to OtterClean! Please read CONTRIBUTING.md for details on our code of conduct and the process for submitting pull requests.
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Python and curses
- Thanks to all contributors who participate in this project
This software is provided as-is, and users are advised to use it at their own risk. Always ensure you have backups before performing system cleanup operations.