Skip to content

Latest commit

 

History

1 Commit

Folders and files

Repository files navigation

diskscout

Find what is actually eating your disk — and clean the safe parts of it without guessing.

Windows' own Storage Settings is vague ("Temporary files: 12 GB") and third-party cleaners tend to be either adware or alarmingly keen to delete things. diskscout just shows you the numbers, tells you exactly which folders it would touch, and defaults to a dry run.

DRIVES
----------------------------------------------------------------
Drive Used     Free     Total    PercentUsed
----- ----     ----     -----    -----------
C     140.4 GB 809.8 GB 950.2 GB        14.8

BIGGEST FOLDERS IN C:\Users\you\AppData\Local
----------------------------------------------------------------
Size     Files Name
----     ----- ----
4.0 GB     590 pip
3.8 GB   29525 Temp
2.5 GB   12494 Microsoft

RECLAIMABLE CACHES
----------------------------------------------------------------
Size     Files Category Name
----     ----- -------- ----
4.0 GB     590 Dev      pip cache
3.8 GB   29525 System   Windows Temp
365.5 MB  1350 Browser  Edge cache

Reclaimable: 8.2 GB

Install

PowerShell 5.1+. No dependencies.

git clone https://github.com/appsmypass/diskscout
Import-Module .\diskscout\DiskScout.psd1

Or run the report directly, without importing anything:

.\diskscout.ps1

Commands

Cmdlet What it does
Invoke-DiskScout The whole report in one go
Get-DiskUsage Used, free and percentage per drive
Get-LargeFolder Ranks immediate subfolders by total size
Get-LargeFile Biggest files under a path
Get-JunkFile Reclaimable caches and how big they are (read-only)
Clear-JunkFile Deletes them — dry run unless you say otherwise

Finding the space

Invoke-DiskScout                              # full report on your profile
Invoke-DiskScout -Path D:\ -Top 20            # somewhere else, more rows

Drill down a level at a time — Get-LargeFolder only measures immediate children, so you follow the big number until you find the culprit:

Get-LargeFolder ~\AppData\Local -Top 10
Get-LargeFolder ~\AppData\Local\pip

Hunt specific files:

Get-LargeFile ~ -Top 20
Get-LargeFile D:\ -MinimumSize 1GB -Extension .iso, .zip, .mp4

Everything returns objects, so the usual pipeline works:

Get-LargeFile ~ -Top 100 | Where-Object Modified -lt (Get-Date).AddYears(-2)
Get-LargeFolder ~ | Export-Csv usage.csv -NoTypeInformation

Reclaiming the space

Get-JunkFile never deletes anything — it only reports:

Get-JunkFile                    # everything
Get-JunkFile -Category Dev      # System | Dev | Browser

Clear-JunkFile prompts before acting. Preview first:

Get-JunkFile | Clear-JunkFile -WhatIf          # show, change nothing
Get-JunkFile -Category Dev | Clear-JunkFile    # prompts per target
Clear-JunkFile -Category Dev -Confirm:$false   # no prompts

What it will and will not touch

Only caches that regenerate themselves:

  • System — Windows Temp, Windows Update download cache, Delivery Optimization, crash dumps, thumbnail cache
  • Dev — npm, yarn, pnpm, pip, NuGet, Gradle, Cargo, Go module cache, Docker Desktop logs
  • Browser — Chrome, Edge and Firefox HTTP caches

It will never touch source code, configuration, documents, downloads or anything a tool cannot rebuild on demand.

Safety rails:

  • Dry run by default; -WhatIf on every destructive command
  • Each target has a minimum age, so today's temp files stay put
  • Files locked by a running process are skipped, never forced
  • Junctions and symlinks are not followed, so nothing is counted or deleted twice
  • Targets needing elevation are flagged and skipped rather than half-failing

Close your browser before clearing browser caches, otherwise most of it is locked and gets skipped.

Notes

Some targets (Windows Update, Delivery Optimization) need an elevated session. Run PowerShell as administrator to include them — diskscout marks them Blocked and skips them otherwise.

The first Get-LargeFolder run on a big tree is disk-bound and can take a minute; a progress bar shows where it is.

License

MIT

About

Find what is actually eating your disk - biggest folders and files, plus reclaimable dev, browser and system caches with a dry-run cleanup.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages