npm remove library-name
rm -rf node_modules/library-name
npm i

More info: https://docs.npmjs.com/uninstalling-packages-and-dependencies