Skip to content

Instantly share code, notes, and snippets.

@josephwambura
Last active December 16, 2023 21:43
Show Gist options
  • Save josephwambura/398899e236b8f4273e83aa2da58a7ad1 to your computer and use it in GitHub Desktop.
Save josephwambura/398899e236b8f4273e83aa2da58a7ad1 to your computer and use it in GitHub Desktop.
Easily Clean Bin/Obj Folders from Visual Studio solution using Powershell

Boot up powershell in admin mode and **_navigate to the root of your repos.

THIS IS VERY IMPORTANT: DO NOT RUN THIS COMMAND IN A SYSTEM FOLDER OR TERRIBLE THINGS WILL HAPPEN.

I am serious about this, make sure you do this in a sub folder. Mine is F:\source\repos

Then run this command:

Get-ChildItem .\ -include bin,obj -Recurse | foreach ($_) { remove-item $_.fullname -Force -Recurse }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment