2

How do I remove Cordova and ionic 1 and its dependency from my Ubuntu completely?. How to reinstall all again?

To install my ionic and its dependency i use this blog https://www.thepolyglotdeveloper.com/2014/09/install-android-cordova-ionic-framework-ubuntu/

I tried npm uninstall -g cordova ionic but it is not working

I am getting this two error

npm WARN uninstall not installed in /home/gopi/node_modules: "cordova"
npm WARN uninstall not installed in /home/gopi/node_modules: "ionic"
Mohan Gopi
  • 7,606
  • 17
  • 66
  • 117

2 Answers2

6

The error actually says that your syntax is wrong for the command. Better try the commands individually:

For ionic:

$ npm cache clear
$ npm uninstall ionic

it should work as in:https://forum.ionicframework.com/t/install-ionic-on-mac/1854/6

If the above command does not uninstall ionic try the one below.

$ sudo npm uninstall -g ionic

For Cordova, the command :

sudo npm uninstall cordova -g

Please note : The -g is after.

Refer: https://stackoverflow.com/a/19523868/1904479

Community
  • 1
  • 1
Kailas
  • 7,350
  • 3
  • 47
  • 63
  • i tried the both anwer but i am not able to do it.I have tried those you reffered in my case – Mohan Gopi Mar 22 '16 at 09:46
  • It may means it's already uninstalled then, just try cordova --version and ionic --version? – Kailas Mar 22 '16 at 10:37
  • just try whereis cordova to get the installation path and try cd to the installation directory an try uninstalling it from there – Kailas Mar 22 '16 at 10:40
  • /opt/node/bin/cordova this is my cordova path i use cd /opt/node/bin and then used the command sudo npm uninstall cordova -g but i am getting the same error – Mohan Gopi Mar 22 '16 at 10:45
  • i referred this blog form my ionic installation https://www.thepolyglotdeveloper.com/2014/09/install-android-cordova-ionic-framework-ubuntu/ – Mohan Gopi Mar 22 '16 at 10:53
  • if your still seeing the version after removal (ionic -v) then you also need to delete it manually rm /usr/local/bin/ionic or wherever it resides. – Joel Davey Jan 03 '19 at 13:58
3

The only thing that worked for me was to run with the -g before

sudo npm uninstall -g cordova
sudo npm uninstall -g ionic
rpamaral25
  • 41
  • 1