Last active
July 11, 2021 01:00
-
-
Save selfagency/a6354bb30ec287b6eec3375bb89a83ae to your computer and use it in GitHub Desktop.
[delete all npm modules]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
npm ls -gp --depth=0 | awk -F/ '/node_modules/ && !/\/npm$/ {print $NF}' | xargs npm -g rm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment