SoFunction
Updated on 2025-04-06

webpack&webpack-cli complete uninstall process

webpack&webpack-cli completely uninstalled

Delete global webpack-cli

npm uninstall -g webpack-cli
# Uninstall uninstall can be abbreviated as un# The complete writing of global -g is --global# Now the question is here. Is webpack-cli really uninstalled?# The answer is no.  So far I haven't found that webpack-cli is installed globally, at least I haven't seen the official documentation.# Then see how to delete the local oneswebpack-cli

Delete local (local) webpack-cli

npm uninstall webpack-cli
# If you look carefully, you will find that the global parameters are removed -g# At this time, your command line will quickly scroll some delete information.# webpack-cliDelete successfully

Delete global webpack

npm uninstall -g webpack
# Why do you need to delete webpack locally and globally# Because you may not be sure that you are installing the webpack globally# It is still installed locally, so it is recommended to execute the global delete command first# Then execute the following local delete command

Delete local webpack

npm un webpack
# At this time, the webpack has been deleted# Actually, it's not finished yet.

Check webpack residual files

ls
# Use the ls command to check if there are these files- node_modules
- 
- 
# There is the best, if not, you may not have found the exact location for your local installation of webpack# Sometimes I can't find it# Now say somethingrm -rf node_modules  
# The above command means deleting these files# Classmate, your webpack has been completely deleted# But Xiaobai must understand it carefully rm and rm -rf The difference,I'm not afraid of saying something wrong here。

Summarize

The above is personal experience. I hope you can give you a reference and I hope you can support me more.