Skip to content

sumanfbc/DiskCleaner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DiskCleaner

A Windows PowerShell module for analyzing and cleaning temporary files to free up disk space.

PowerShell Gallery PowerShell Gallery Downloads

Installation

Install from PowerShell Gallery:

Install-Module -Name DiskCleaner

Features

  • Get-DiskUsage - Display disk space usage with visual progress bars
  • Get-TempFileInfo - Analyze temporary files and show potential space savings
  • Clear-TempFiles - Safely remove temporary files (skips files in use)
  • Get-RecycleBinInfo - View recycle bin size and item count
  • Clear-RecycleBin - Empty the recycle bin safely

Usage

View Disk Usage

# Show all drives
Get-DiskUsage

# Show specific drive
Get-DiskUsage -Drive C

Output:

=== Disk Usage ===

Drive C:
[===============...............] 48.6% used
  Total: 463.29 GB
  Used:  225.14 GB
  Free:  238.15 GB

Analyze Temporary Files

# Basic analysis
Get-TempFileInfo

# Include browser caches
Get-TempFileInfo -IncludeBrowserCache

Clean Temporary Files

# Preview what would be deleted
Clear-TempFiles -WhatIf

# Clean with confirmation
Clear-TempFiles

# Clean without confirmation
Clear-TempFiles -Force

# Include browser caches
Clear-TempFiles -IncludeBrowserCache

Recycle Bin Management

# View recycle bin info
Get-RecycleBinInfo

# Empty recycle bin with confirmation
Clear-RecycleBin

# Empty recycle bin without confirmation
Clear-RecycleBin -Force

Locations Cleaned

  • Windows Temp folder (%TEMP%)
  • User Temp folder (%LOCALAPPDATA%\Temp)
  • Thumbnail cache
  • Recycle Bin
  • Browser caches (optional):
    • Google Chrome
    • Microsoft Edge

Requirements

  • Windows PowerShell 5.1 or PowerShell Core 7+
  • Windows operating system

License

MIT License - see LICENSE file for details.

Author

sumandhk - PowerShell Gallery

Contributing

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

About

A Windows PowerShell module for analyzing and cleaning temporary files to free up disk space

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published