I have an Ubuntu 14.04 system. I had installed npm and I installed bower using
sudo npm install -g bower
Some time after that I realized that I was using the node and npm that came fromt he ubuntu repositories, so to use the latest one, I added the repository:
$ sudo add-apt-repository ppa:chris-lea/node.js
and update the packages.
Now I was trying to uninstall bower from the system, but guess what? I get this:
$ sudo npm remove -g bower
npm WARN uninstall not installed in /usr/lib/node_modules: "bower"
So, wait, what? It cant find Bower? So I try to make
which bower
and the output here is:
/usr/local/bin/bower
I dont really understand what is going on. I suspect that I have a problem with different versions of npm and nodejs not playing nice together, since I installed bower with a different version of npm
that the one I have installed now. Any idea of how I could uninstall Bower now? (Or at least come back to a clean state, so that I can begin from the beginning?)
Uninstall packages If you use the bower. json file, remove the package from this file and launch bower install again. It will not remove it, you have to use the bower uninstall command.
In almost all cases, it's more appropriate to use Browserify and npm over Bower. It is simply a better packaging solution for front-end apps than Bower is. At Spotify, we use npm to package entire web modules (html, css, js) and it works very well.
To remove a package with the npm uninstall command, you can use the syntax npm uninstall package-name in the directory where the package is located.
sudo npm uninstall bower -g --prefix=/usr/local
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With