Find the biggest new files
Lists the 50 largest files created or changed recently.
$d = (Get-Date).AddDays(-5)Sets the cutoff date. Prints nothing.
$files = Get-ChildItem C:\ -Recurse -File -Force -ErrorAction SilentlyContinueScans the whole drive. Takes 5–15 minutes and looks frozen. Wait for the PS prompt.
$recent = $files | Where-Object { $_.LastWriteTime -gt $d -or $_.CreationTime -gt $d }$top = $recent | Sort-Object -Property Length -Descending | Select-Object -First 50$top.CountShould print 50.
$top | Select-Object Length, FullNameLength is in bytes: 1,073,741,824 bytes = 1 GB.
See which folders grew
Catches folders full of small files that never make the top 50.
$groups = $recent | Group-Object DirectoryName$sum = foreach ($g in $groups) { [pscustomobject]@{MB=[math]::Round(($g.Group | Measure-Object Length -Sum).Sum/1MB); Folder=$g.Name} }$sum | Sort-Object MB -Descending | Select-Object -First 25($recent | Measure-Object Length -Sum).Sum / 1GBThe last line shows how many GB changed in your lookback window.
Quick wins: Temp and Prefetch
Press Win + R, paste a location, press Enter, then Ctrl + A and Delete.
Your temp files
%temp%Windows temp
C:\Windows\TempApprove the admin prompt.
Prefetch
C:\Windows\PrefetchRebuilds itself. Apps may open a little slower the first time.
File in use? Tick Do this for all current items and click Skip. Delete the contents only, never the folders. Then empty the Recycle Bin.
Read your results
Most big files are normal. Here's how to tell the difference.
Leave these alone
- pagefile.sys, hiberfil.sysWindows memory files
- C:\Windows\System32, WinSxSthe operating system
- .dll and .exe in Program Filesinstalled programs
- Database journalsMongoDB, SQL and similar
- Windows Defender .vdm filesantivirus definitions
Usually safe to clean
- Old Edge installersC:\Program Files (x86)\Microsoft\EdgeUpdate\Download
- Google Updater cache (contents)C:\Program Files (x86)\Google\GoogleUpdater\crx_cache
- AI model caches%USERPROFILE%\.cache\huggingface
- Old app versionskeep the newest version folder
- Adobe caches and logs%LOCALAPPDATA%\Temp\Adobe
- Duplicate renders, build filesyour own project folders
Paste any path into the File Explorer address bar to open it. Not sure what something is? Leave it, or ask us.
Use the built-in tools
Don't delete these by hand.
Windows Search index
Can grow to several GB.
Indexing Options › Advanced › Rebuild
Windows Update leftovers
Old update files.
Disk Cleanup › Clean up system files
Snapshot now, compare next month
Windows doesn't remember old file sizes. A snapshot does.
New-Item -ItemType Directory -Force "$env:USERPROFILE\StorageScans" | Out-Null$files | Select-Object FullName, Length | Export-Csv "$env:USERPROFILE\StorageScans\snapshot_$(Get-Date -Format yyyyMMdd).csv" -NoTypeInformationNext time, after running step 01 again:
Get-ChildItem "$env:USERPROFILE\StorageScans"$old = Import-Csv "$env:USERPROFILE\StorageScans\snapshot_YYYYMMDD.csv"$map = @{}; foreach ($o in $old) { $map[$o.FullName] = [long]$o.Length }$diff = foreach ($n in $files) { $p = $map[$n.FullName]; if ($p -eq $null) { [pscustomobject]@{Change='New'; MB=[math]::Round($n.Length/1MB,1); FullName=$n.FullName} } elseif ($n.Length -gt $p) { [pscustomobject]@{Change='Grew'; MB=[math]::Round(($n.Length-$p)/1MB,1); FullName=$n.FullName} } }$diff | Sort-Object MB -Descending | Select-Object -First 50Every new file, and exactly how much each one grew.
If something goes wrong
- >> in the prompt
- Press Ctrl+C to get back to PS.
- Empty list
- Run
$files.Count,$recent.Countand$top.Count. - Counts are blank
- The window was closed. Start again at step 01 in one window.
- Red error text
- Re-check the pasted line. Use the Copy buttons so nothing gets cut off.