Requirements: Run as Administrator in Terminal/Command Prompt (Required for Memory Cleanup on Windows)
System Junk Files Killer is a comprehensive command-line utility for Windows and Linux systems that combines system maintenance with advanced diagnostics. The tool helps users efficiently remove temporary files, optimize system memory, and provide powerful system information logging and Android device debugging capabilities.
Whether you're a developer needing Android device logs, a user looking to optimize system performance, or need to free up memory like memreduct does, this tool streamlines the process through an intuitive menu-driven interface and automated log tracking.
- System Junk Files Remover: Automatically clears temporary files from system directories (
Temp,%Temp%,/tmp, etc.) to free up disk space and improve system performance. - Clean Memory Usage ⭐ NEW: Optimize system memory to improve performance and battery life (inspired by memreduct):
- Windows: Uses aggressive Native API techniques to clear standby pages, working sets, and system cache
- Linux: Utilizes proc filesystem to drop caches and compact memory
- Supports both 32-bit and 64-bit systems
- Provides real-time memory statistics and improvement metrics
- Cross-platform support with automatic OS detection
- System Information & Log Tracking: Captures detailed system diagnostics including OS information, hardware specs, CPU details, RAM, disk information, and timestamped system logs for troubleshooting.
- Android Device Log Tracking: Records and manages Android device logs via ADB (Android Debug Bridge) for debugging and development purposes.
- Cross-Platform Support: Works on both Windows and Linux systems with platform-specific optimizations.
- Professional UI: Clean, user-friendly terminal interface with color-coded output for better readability.
- Organized Log Management: Stores system logs separately in dedicated folders (
SystemLogfor system diagnostics, similar toDeviceLogfor Android logs) with automatic timestamping. - Modular Architecture: Well-organized code structure with separated concerns for maintainability and extensibility.
-
Clone the Repository:
git clone https://github.com/VadaPavMan/System-Junk-Files-Killer.git cd System-Junk-Files-Killer -
Build from Source: Navigate to the
src/directory where all source files are located:On Windows (MinGW/GCC with C++17):
cd src g++ -std=c++17 main.cpp src.cpp log_tracker.cpp memory_cleaner.cpp -o JunksCleaner.exe -lshell32Static Linking, Windows (MinGW/GCC with C++17) [Use This For Single Executable File, That Can Be Used]:
cd src g++ -std=c++17 main.cpp src.cpp log_tracker.cpp memory_cleaner.cpp -o JunksCleaner.exe -lshell32 -static-libgcc -static-libstdc++On Linux (GCC with C++17):
cd src g++ -std=c++17 main.cpp src.cpp log_tracker.cpp memory_cleaner.cpp -o JunksCleanerStatic Binary for Linux (Recommended for Distribution):
cd src g++ -std=c++17 -static main.cpp src.cpp log_tracker.cpp memory_cleaner.cpp -o JunksCleanerAppImage for Linux (Portable, No Installation Required):
# Install appimagetool first sudo apt install appimagetool # Ubuntu/Debian # or sudo pacman -S appimagetool # Arch Linux # Then build AppImage ./build-appimage.sh
-
Run the Program:
On Windows (Run as Administrator for full functionality):
.\JunksCleaner.exeOn Linux (Use sudo for cache dropping):
./JunksCleaner # Or with sudo for better cache flushing: sudo ./JunksCleaner -
Select an Option:
- Option 1: Remove system junk files (frees up temporary files and cleans system directories)
- Option 2: Clean Memory Usage (optimizes system memory - Windows & Linux supported) ⭐ NEW
- Option 3: Android device log tracking (requires ADB to be installed and configured)
- Option 4: System information and log tracking (captures OS details, hardware info, and system diagnostics)
- Option 5: Exit the program
src/
├── main.cpp # Application entry point and main menu interface
├── src.cpp # Core functionality and utility functions
├── src.hpp # Function declarations and header definitions
├── log_tracker.cpp # System information capture and log tracking implementation
├── log_tracker.hpp # Log tracking class and data structure definitions
├── memory_cleaner.cpp # Cross-platform memory optimization implementation ⭐ NEW
├── memory_cleaner.hpp # Memory cleaner class and declarations ⭐ NEW
├── adblog.bat # Windows batch script for Android device logging
├── adblog.sh # Linux shell script for Android device logging
└── JunksCleaner.exe # Compiled executable (Windows)
The "Clean Memory Usage" feature provides professional-grade memory optimization similar to memreduct:
Windows Memory Optimization:
- Clears working sets of all running processes (3 aggressive passes)
- Flushes system standby page lists using Native API
- Forces system cache clearing with large buffer allocation
- Compacts memory and trims process heaps
- Provides real-time memory statistics before/after
Linux Memory Optimization:
- Scans and analyzes all running processes
- Drops filesystem cache via
/proc/sys/vm/drop_caches - Compacts heap memory using
malloc_trim() - Synchronizes filesystem buffers
- Shows memory improvement percentage
How It Works:
- User selects Option 2 from main menu
- Program detects operating system automatically
- Confirms action before proceeding
- Displays 5-step progress:
- Step 1: Analyzes system memory
- Step 2: Clears/optimizes process working sets
- Step 3: Flushes system cache
- Step 4: Compacts memory
- Step 5: Analyzes results and shows report
Performance Impact:
- Typical memory savings: 5-15% on Windows
- Improved battery life on laptops
- Better system responsiveness
- No negative side effects
- System Logs:
- Windows:
%USERPROFILE%\JunksCleaner\SystemLog - Linux:
~/.junkscleaner/system_log
- Windows:
- Log Format: Files are automatically timestamped (e.g.,
system_info_20260404_152850.txt) - Captured Information: OS details, CPU information, RAM usage, disk space, system events, and error logs
-
For Developers/Advanced Users:
- Compiler: GCC/G++ with C++17 support
- Operating Systems:
- Windows: Windows 7 or higher (64-bit or 32-bit)
- Linux: Ubuntu, Fedora, Debian, or other distributions
- Additional Requirements:
- Windows: Shell32 library (included with MinGW), Administrator privileges recommended for memory cleanup
- Linux: Standard POSIX libraries, sudo access recommended for cache dropping
- For Option 3: ADB (Android Debug Bridge) must be installed and in system PATH
-
For Non-Technical Users (Easy Installation):
- Linux: Any modern Linux distribution (Ubuntu 18.04+, Fedora 30+, Debian 10+, etc.)
- No compilation required - just download and run
- No additional dependencies - everything is included in the portable binaries
- Performance Improvement: Frees up disk space and reduces system clutter by removing unnecessary temporary files
- Memory Optimization: Reduces memory footprint by 5-15% with professional-grade memory cleanup
- Battery Life: Improved power efficiency especially on laptops through memory optimization
- System Diagnostics: Comprehensive logging for troubleshooting and system analysis
- Developer Friendly: Simplified Android device debugging with automated log capture
- Cross-Platform: Works seamlessly on both Windows and Linux systems
- Automated Process: Minimal user interaction required with intuitive menu-driven interface
- memreduct-style Cleanup: Achieves similar results to popular memory optimization tools
- User Friendly: Easy installation options for non-technical users (AppImage, static binaries, one-click installer)
- GUI interface for easier user interaction: (Phase 1) Released
- Scheduled automatic cleanup tasks
- Advanced log analysis and filtering
- Cloud backup for captured logs
- System performance metrics and optimization suggestions
- Deep system optimization for SSD performance
- Scheduled memory cleanup at system startup
This project is open-source and available under the MIT License. Feel free to contribute, modify, or use it as per your needs.
Contributions are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on GitHub.


