Skip to content

Instantly share code, notes, and snippets.

@vub
Created December 22, 2020 11:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vub/768e2e2a50a57c942a14c81bf20862d5 to your computer and use it in GitHub Desktop.
Save vub/768e2e2a50a57c942a14c81bf20862d5 to your computer and use it in GitHub Desktop.
Script to clean windows
yarn cache clean
npm cache clean --force
npm cache verify
Remove-Item -path C:\Users\Admin\Downloads -recurse
Clear-RecycleBin -Force
<#
Note: Eliminate `-WhatIf` parameter to get action be actually done
Note: PS with version prior to 4.0 can't delete non-empty folders
#>
Get-ChildItem -Path "." -Include "node_modules" -Recurse -Directory | Remove-Item -Recurse -Force -WhatIf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment