Clean Up NuGet Cache Automatically with PowerShell | Save Disk Space

Опубликовано: 25 Июнь 2026
на канале: Stef from Samayas
224
3

Clean up your NuGet cache automatically with PowerShell and reclaim disk space by removing old package versions you no longer need.

In this video, I show how to build a PowerShell script that scans a NuGet package cache, identifies outdated versions, and removes them safely. I also show how to automate the cleanup with Windows Task Scheduler so it runs at logon without manual effort.

0:00 - Introduction
0:09 - Description
2:16 - Creating the Script
5:55 - Automating
8:45 - Conclusion

This tutorial is useful if your development machine keeps filling up with old NuGet packages and you want a simple way to keep things under control.

I walk through the cleanup problem, create a reusable and parameterized PowerShell script, and then schedule it so the process becomes automatic.

#NuGet #PowerShell #DotNet

Follow me on X: https://l.samayas.eu/jo3eaYEf3E?P=YT&...

Sample Code
Nuget Cache Cleanup script : https://l.samayas.eu/bqokD5Hn8u?P=YT&...

Buy me a Coffee: https://l.samayas.eu/jX6xL7EWhd?P=YT&...

Studio Equipment
Camera Sony Alpha ZV-E10 II: https://l.samayas.eu/k7y90TREl0?P=YT&...
Secondary Camera Obsbot Tail Air: https://l.samayas.eu/iFQu9WfmCw?P=YT&...
Elgato Prompter: https://l.samayas.eu/fHVrqqXtSc?P=YT&...
Microphone Rode Wireless GO II: https://l.samayas.eu/afBINjiBXN?P=YT&...