npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

cleaner-master

v1.0.0

Published

advanced system cleaner package

Readme

cleaner-master


Table of Contents


What is Cleaner Master?

Cleaner Master is a professional system optimization toolkit for Node.js that helps free up disk space, boost RAM performance, monitor CPU temperature, and eliminate zombie processes. Unlike traditional system cleaners, Cleaner Master provides a safe, whitelist-based approach with dry-run capabilities so you can preview changes before executing them.

Cleaner Master is designed for:

  • Developers who need to clean old node_modules folders
  • System administrators managing temp and cache files
  • Desktop application developers needing built-in cleanup functionality
  • Users experiencing slow systems due to accumulated garbage files
  • CI/CD pipelines needing automated disk space management

Features

| Category | Features | |----------|----------| | File Cleaners | Temp files cleaner, Cache cleaner (Chrome, Code, system), Log rotator (auto-delete old logs), Duplicate file finder/remover | | Performance Optimizers | RAM booster (kill memory-hogging processes), CPU cooler (detect high CPU usage), Zombie process killer | | Developer Tools | Old node_modules cleaner (save GBs of space), Startup manager (disable auto-start apps), System statistics monitor | | Safety | Blacklisted paths protection, Whitelisted temp paths, Dry-run preview mode, Process blacklist (system-critical) | | CLI | Interactive commands, Real-time monitoring, Dry-run flags, Verbose output | | Multi-Language | JavaScript/TypeScript (Native), PHP, Python, Java, Go, Rust (via HTTP API) |


Installation

From NPM

npm install cleaner-master
npm install -g cleaner-master

Requirements

Requirement Minimum Recommended Node.js 18.0.0 20.0.0+ RAM 128 MB 512 MB+ Storage 50 MB 1 GB+ OS Linux 5.4+ / Windows 10+ / macOS 11+ Ubuntu 22.04 / Windows 11


Quick Start

JavaScript / TypeScript

const { 
  cleanTempFiles, 
  getMemoryHogs, 
  killProcess,
  getCpuHogs,
  findOldNodeModules,
  cleanOldNodeModules,
  rotateOldLogs
} = require('cleaner-master');

async function main() {
  // Preview what would be deleted (dry run)
  console.log('=== DRY RUN MODE ===');
  await cleanTempFiles(true);
  
  // Actually clean temp files
  console.log('=== ACTUAL CLEANUP ===');
  const deleted = await cleanTempFiles(false);
  console.log(`Deleted ${deleted} temp files`);
  
  // Find memory hogs
  const hogs = await getMemoryHogs(5);
  console.log('Top 5 memory hogs:');
  hogs.forEach(hog => {
    console.log(`  ${hog.name}: ${(hog.memory / 1024 / 1024).toFixed(2)} MB`);
  });
  
  // Find old node_modules (90+ days old)
  const oldModules = await findOldNodeModules(90);
  console.log(`Found ${oldModules.length} old node_modules folders`);
  
  // Clean old logs (30+ days old)
  const logsCleaned = await rotateOldLogs(30);
  console.log(`Rotated ${logsCleaned} old log files`);
}

main();

Using CLI

# Preview temp files without deleting
cleaner-master clean-temp --dry-run

# Actually clean temp files
cleaner-master clean-temp

# Check and kill memory hogs
cleaner-master ram-boost

# Check CPU hogs and temperature
cleaner-master cpu-check

# Show help
cleaner-master --help

CLI Usage

Basic Commands

# Clean temporary files
cleaner-master clean-temp
cleaner-master clean-temp --dry-run

# Boost RAM by killing memory hogs
cleaner-master ram-boost
cleaner-master ram-boost --dry-run

# Check CPU usage and temperature
cleaner-master cpu-check

# Find and kill zombie processes
cleaner-master kill-zombies
cleaner-master kill-zombies --dry-run

# Clean old node_modules folders
cleaner-master clean-modules --days 90
cleaner-master clean-modules --dry-run

# Rotate old log files
cleaner-master rotate-logs --days 30

# Find duplicate files in directory
cleaner-master find-dupes --dir ./downloads

# List startup items
cleaner-master startup-list

# Disable startup item
cleaner-master startup-disable --name "Spotify"

# Show system stats
cleaner-master stats

# Show help
cleaner-master --help

Interactive CLI Commands

Command Description clean-temp Clean temporary files ram-boost Kill memory-hogging processes cpu-check Show CPU hogs and temperature kill-zombies Find and kill zombie processes clean-modules Clean old node_modules folders rotate-logs Delete old log files find-dupes Find duplicate files startup-list List startup applications stats Show system statistics exit Quit CLI


Multi-Language Support

Python

import subprocess
import json

def clean_temp_files(dry_run=False):
    cmd = ["cleaner-master", "clean-temp"]
    if dry_run:
        cmd.append("--dry-run")
    result = subprocess.run(cmd, capture_output=True, text=True)
    return result.stdout

def get_memory_hogs(limit=5):
    from cleaner_master import get_memory_hogs
    hogs = get_memory_hogs(limit)
    return hogs

# Example
print(clean_temp_files(dry_run=True))

PHP

<?php
function cleanTempFiles($dryRun = false) {
    $cmd = "cleaner-master clean-temp";
    if ($dryRun) {
        $cmd .= " --dry-run";
    }
    return shell_exec($cmd);
}

function getMemoryHogs($limit = 5) {
    $output = shell_exec("cleaner-master ram-boost 2>&1");
    return $output;
}

echo cleanTempFiles(true);
?>

Java

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class CleanerMaster {
    public static void cleanTempFiles(boolean dryRun) throws Exception {
        ProcessBuilder pb = new ProcessBuilder("cleaner-master", "clean-temp");
        if (dryRun) pb.command().add("--dry-run");
        
        Process process = pb.start();
        BufferedReader reader = new BufferedReader(
            new InputStreamReader(process.getInputStream())
        );
        
        String line;
        while ((line = reader.readLine()) != null) {
            System.out.println(line);
        }
    }
    
    public static void main(String[] args) throws Exception {
        cleanTempFiles(true);
    }
}

Go

package main

import (
    "fmt"
    "os/exec"
)

func cleanTempFiles(dryRun bool) error {
    args := []string{"clean-temp"}
    if dryRun {
        args = append(args, "--dry-run")
    }
    
    cmd := exec.Command("cleaner-master", args...)
    output, err := cmd.Output()
    if err != nil {
        return err
    }
    
    fmt.Println(string(output))
    return nil
}

func main() {
    cleanTempFiles(true)
}

Rust

use std::process::Command;

fn clean_temp_files(dry_run: bool) -> Result<(), Box<dyn std::error::Error>> {
    let mut cmd = Command::new("cleaner-master");
    cmd.arg("clean-temp");
    
    if dry_run {
        cmd.arg("--dry-run");
    }
    
    let output = cmd.output()?;
    println!("{}", String::from_utf8(output.stdout)?);
    Ok(())
}

fn main() {
    let _ = clean_temp_files(true);
}

Express.js API

const express = require('express');
const { exec } = require('child_process');
const util = require('util');
const execPromise = util.promisify(exec);

const app = express();
app.use(express.json());

app.post('/api/clean/temp', async (req, res) => {
    const { dryRun } = req.body;
    const cmd = `cleaner-master clean-temp ${dryRun ? '--dry-run' : ''}`;
    
    try {
        const { stdout, stderr } = await execPromise(cmd);
        res.json({ success: true, output: stdout, error: stderr });
    } catch (error) {
        res.status(500).json({ success: false, error: error.message });
    }
});

app.get('/api/system/stats', async (req, res) => {
    try {
        const { stdout } = await execPromise('cleaner-master stats');
        res.json({ success: true, stats: stdout });
    } catch (error) {
        res.status(500).json({ success: false, error: error.message });
    }
});

app.get('/api/memory/hogs', async (req, res) => {
    try {
        const { stdout } = await execPromise('cleaner-master ram-boost');
        res.json({ success: true, hogs: stdout });
    } catch (error) {
        res.status(500).json({ success: false, error: error.message });
    }
});

app.listen(3000, () => {
    console.log('Cleaner Master API running on port 3000');
});

API Reference

Core Functions

Function Description Returns cleanTempFiles(dryRun) Delete temporary files Promise (deleted count) cleanCacheFiles(dryRun) Delete cache files (Chrome, Code, system) Promise rotateOldLogs(daysOld, dryRun) Delete logs older than N days Promise findDuplicates(directory, dryRun) Find duplicate files Promise<Map<string, string[]>> removeDuplicates(directory, keepNewest, dryRun) Remove duplicate files Promise

Performance Functions

Function Description Returns getMemoryHogs(limit) Get top memory-consuming processes Promise<ProcessInfo[]> killProcess(pid, dryRun) Kill a process by PID Promise getCpuHogs(limit) Get top CPU-consuming processes Promise<CpuProcess[]> checkCpuTemperature() Get CPU temperature Promise<number | null> findZombieProcesses() Find zombie processes Promise<ZombieProcess[]> killZombies(dryRun) Kill zombie processes Promise

Developer Functions

Function Description Returns findOldNodeModules(daysOld) Find old node_modules folders Promise<OldModule[]> cleanOldNodeModules(daysOld, dryRun) Delete old node_modules Promise getStartupItems() List startup applications Promise<StartupItem[]> disableStartupItem(name, dryRun) Disable startup item Promise

System Functions

Function Description Returns getSystemStats() Get CPU, memory, disk stats Promise getDiskFreeSpace() Get free disk space in bytes Promise isLowDiskSpace(thresholdGB) Check if disk space is low Promise

Types

interface ProcessInfo {
  pid: number;
  name: string;
  memory: number;  // bytes
  cpu: number;     // percentage
}

interface OldModule {
  path: string;
  lastAccess: Date;
  size: number;    // bytes
}

interface StartupItem {
  name: string;
  path: string;
  enabled: boolean;
}

interface SystemStats {
  cpu: { load: number; cores: number };
  memory: { total: number; used: number; free: number; usagePercent: number };
  disk: { free: number; size: number; usagePercent: number };
  temperature: number | null;
}

Safety Features

Blacklisted Paths (NEVER touched)

- /system32
- /etc
- /usr/bin
- /usr/sbin
- C:\windows\system32
- C:\windows\syswow64
- /boot
- /dev

Whitelisted Temp Paths

- os.tmpdir()
- AppData/Local/Temp (Windows)
- /tmp (Linux/macOS)
- /var/tmp (Linux)

Process Blacklist (NEVER killed)

PID: 0, 1, 4, 8, 12, 14, 16 (system-critical processes)

Dry Run Mode

Always use --dry-run first to preview what will be deleted:

cleaner-master clean-temp --dry-run
cleaner-master ram-boost --dry-run
cleaner-master clean-modules --dry-run

Usage Examples

Basic Cleanup

const { cleanTempFiles, rotateOldLogs } = require('cleaner-master');

async function basicCleanup() {
  // Preview
  console.log('Previewing temp files...');
  await cleanTempFiles(true);
  
  // Execute
  console.log('Cleaning temp files...');
  const deleted = await cleanTempFiles(false);
  console.log(`Deleted ${deleted} temp files`);
  
  // Rotate logs older than 60 days
  const rotated = await rotateOldLogs(60);
  console.log(`Rotated ${rotated} log files`);
}

Performance Optimization

const { getMemoryHogs, killProcess, getCpuHogs, checkCpuTemperature } = require('cleaner-master');

async function optimizePerformance() {
  // Find memory hogs
  const memoryHogs = await getMemoryHogs(5);
  console.log('Top memory hogs:');
  
  for (const hog of memoryHogs) {
    const memoryMB = (hog.memory / 1024 / 1024).toFixed(2);
    console.log(`  ${hog.name}: ${memoryMB} MB`);
    
    // Kill if over 500MB (except system processes)
    if (hog.memory > 500 * 1024 * 1024 && hog.name !== 'node') {
      const killed = await killProcess(hog.pid);
      if (killed) console.log(`    Killed ${hog.name}`);
    }
  }
  
  // Check CPU temperature
  const temp = await checkCpuTemperature();
  if (temp && temp > 80) {
    console.log(`Warning: CPU temperature is ${temp}°C`);
    
    // Find CPU hogs
    const cpuHogs = await getCpuHogs(3);
    console.log('CPU hogs to investigate:');
    cpuHogs.forEach(hog => {
      console.log(`  ${hog.name}: ${hog.cpu.toFixed(1)}% CPU`);
    });
  }
}

Developer Workspace Cleanup

const { findOldNodeModules, cleanOldNodeModules, findDuplicates, removeDuplicates } = require('cleaner-master');
const path = require('path');

async function developerCleanup() {
  // Find old node_modules (120+ days old)
  const oldModules = await findOldNodeModules(120);
  console.log(`Found ${oldModules.length} old node_modules folders`);
  
  let totalSize = 0;
  for (const module of oldModules) {
    const sizeGB = (module.size / 1024 / 1024 / 1024).toFixed(2);
    totalSize += module.size;
    console.log(`  ${path.basename(path.dirname(module.path))}: ${sizeGB} GB`);
  }
  console.log(`Total potential savings: ${(totalSize / 1024 / 1024 / 1024).toFixed(2)} GB`);
  
  // Clean them
  const cleaned = await cleanOldNodeModules(120);
  console.log(`Cleaned ${cleaned} old node_modules folders`);
  
  // Find duplicates in downloads folder
  const downloadsPath = path.join(require('os').homedir(), 'Downloads');
  const duplicates = await findDuplicates(downloadsPath, true);
  console.log(`Found ${duplicates.size} duplicate groups`);
  
  // Remove duplicates (keep newest)
  const removed = await removeDuplicates(downloadsPath, true);
  console.log(`Removed ${removed} duplicate files`);
}

Scheduled Cleanup (Cron Job)

const cron = require('node-cron');
const { cleanTempFiles, rotateOldLogs, cleanOldNodeModules, getDiskFreeSpace } = require('cleaner-master');

// Run weekly cleanup every Sunday at 2 AM
cron.schedule('0 2 * * 0', async () => {
  console.log('Starting weekly cleanup...');
  
  const beforeFree = await getDiskFreeSpace();
  console.log(`Free space before: ${(beforeFree / 1024 / 1024 / 1024).toFixed(2)} GB`);
  
  await cleanTempFiles(false);
  await rotateOldLogs(30);
  await cleanOldNodeModules(90);
  
  const afterFree = await getDiskFreeSpace();
  const freed = (afterFree - beforeFree) / 1024 / 1024 / 1024;
  console.log(`Cleanup complete. Freed ${freed.toFixed(2)} GB`);
});

console.log('Scheduled cleanup active (every Sunday at 2 AM)');

FAQ

Q1: Is Cleaner Master safe to use?

Answer: Yes, Cleaner Master includes multiple safety layers:

· Blacklisted paths that are never touched · Whitelisted temp paths only · Dry-run mode to preview changes · Process blacklist (system-critical processes are never killed)

Always use --dry-run first to verify what will be affected.

Q2: Can Cleaner Master delete important system files?

Answer: No. Cleaner Master explicitly blacklists system-critical paths like /system32, /etc, /usr/bin, and others. It only operates on whitelisted temp directories and user-controlled paths.

Q3: How does the RAM booster work?

Answer: The RAM booster doesn't add RAM - it identifies memory-hogging processes and allows you to kill them. This frees up RAM that was being used by unnecessary applications. System-critical processes (PID 0,1,4,8,12,14,16) are never killed.

Q4: Can I recover files deleted by Cleaner Master?

Answer: No, deletions are permanent. Always use --dry-run first to preview. For important data, ensure you have backups before running cleanup operations.

Q5: Does Cleaner Master work on all operating systems?

Answer: Yes, Cleaner Master works on Windows, Linux, and macOS. Path detection and temp directory locations are automatically detected based on your OS.

Q6: How much disk space can I expect to free?

Answer: Results vary depending on your usage:

· Temp files: Typically 100MB-5GB · Cache files: 500MB-10GB · Old logs: 100MB-2GB · Old node_modules: 1GB-50GB (for developers)

Q7: Can I use Cleaner Master in production?

Answer: Yes, Cleaner Master is suitable for production use in:

· CI/CD pipelines (clean disk space before builds) · Server maintenance scripts · Desktop applications with built-in cleanup · Cron jobs for automated maintenance

Q8: What's the difference between dry-run and actual execution?

Answer: Dry-run mode only displays what WOULD be deleted without actually deleting anything. It's a preview mode for safety. Remove --dry-run to execute actual deletions.

Q9: How do I clean specific directories?

Answer: For duplicate finder, you can specify a directory:

await removeDuplicates('/path/to/directory');

Q10: What are zombie processes and why kill them?

Answer: Zombie processes are processes that have completed execution but still have an entry in the process table. They consume minimal resources but can accumulate over time. Killing them cleans up the process table.


Terms of Service

Please read these Terms of Service carefully before using Cleaner Master.

  1. Acceptance of Terms

By downloading, installing, or using Cleaner Master (the "Software"), you agree to be bound by these Terms of Service.

  1. Intended Use

Cleaner Master is designed for legitimate purposes including:

· Freeing up disk space on your own systems · Optimizing system performance · Cleaning development artifacts (node_modules, build files) · Automated maintenance in CI/CD pipelines · Desktop application optimization

  1. Prohibited Uses

You agree NOT to use Cleaner Master for:

· Deleting system-critical files (blocked by blacklist) · Deleting other users' data without permission · Any malicious or destructive purposes · Bypassing security controls · Any activity that could harm the author or other users

  1. Responsibility and Liability

THE AUTHOR PROVIDES THIS SOFTWARE "AS IS" WITHOUT WARRANTIES. YOU BEAR FULL RESPONSIBILITY FOR YOUR ACTIONS. THE AUTHOR IS NOT LIABLE FOR ANY DAMAGES, LEGAL CONSEQUENCES, OR ANY OTHER OUTCOMES RESULTING FROM YOUR USE.

  1. Backup Recommendation

Always maintain backups of important data before running cleanup operations. Dry-run mode is provided for preview purposes but does not guarantee identification of all potential issues.

  1. No Warranty

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, AND NONINFRINGEMENT.

  1. Indemnification

You agree to indemnify and hold the Author harmless from any claims arising from your use of the Software.

  1. Limitations of Liability

IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

  1. Ethical Reminder

Cleaner Master is built to help developers and system administrators maintain clean, efficient systems. Please use this tool responsibly. Always preview with dry-run, maintain backups of important data, and never use this tool on systems you don't own or have permission to manage.


License

MIT License

Copyright (c) 2026 Dimzxzzx07

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.