Nativescript-cli: Uninstall/Remove Nativescript-cli

Created on 26 Apr 2016  路  13Comments  路  Source: NativeScript/nativescript-cli

How to uninstall Nativescript-cli?

Most helpful comment

npm uninstall -g nativescript (for global installations)
or
npm uninstall nativescript (for local installations)

All 13 comments

npm uninstall -g nativescript (for global installations)
or
npm uninstall nativescript (for local installations)

Thanks you so much sir

@SaddamMakrani if you installed with yarn then do yarn global remove nativescript.

Otherwise try running which tns - that should print the path where you have it installed.

I installed with npm, not yarn.
and using which command I am getting below please check
https://user-images.githubusercontent.com/48545158/105341855-9a678700-5c05-11eb-9415-dc2532249f06.png

Try with where tns - looks like you don't have which on your system...

it's on this path

C:Program Filesnodejstns
C:Program Filesnodejstns.cmd

what I need to check next

If you do where npm and where node - does it point to something in C:\Program Files\nodejs\? If not, your PATH is set up incorrectly (you have multiple node installations on your machine).

In any case, you can manually delete the files:

C:\Program Files\nodejs\tns
C:\Program Files\nodejs\tns.cmd

C:\Program Files\nodejs\ns (if exists)
C:\Program Files\nodejs\ns.cmd (if exists)

C:\Program Files\nodejs\nsc (if exists)
C:\Program Files\nodejs\nsc.cmd (if exists)

C:\Program Files\nodejs\nativescript (if exists)
C:\Program Files\nodejs\nativescript.cmd (if exists)

C:\Program Files\nodejs\node_modules\nativescript (if exists)

If you fix your PATH these would be automatically cleaned up when running npm uninstall -g nativescript - but it's basically the same as deleting the files.

viradiyas@viradiyas:~/Amit$ export ANDROID_HOME="/android-sdk/"
viradiyas@viradiyas:~/Amit$ export PATH="${PATH}:${ANDROID_HOME}tools/:${ANDROID_HOME}platform-tools/"
viradiyas@viradiyas:~/Amit$ echo $ANDROID_HOME

viradiyas@viradiyas:~/Amit$ tns doctor

when run tns doctor in terminal I got below error
The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android.

@viradiya1993 completely different issue, but is /android-sdk/ actually where you have the sdk installed to?

Check with

$ ls -al /android-sdk/

Should print something like:

total 8
drwxr-xr-x  15 rigor789  staff  480 Jan  4 14:01 .
drwxr-xr-x   3 rigor789  staff   96 Sep  8 16:27 ..
drwxr-xr-x   2 rigor789  staff   64 Jan  4 14:01 .downloadIntermediates
-rw-r--r--   1 rigor789  staff   16 Jan 21 10:26 .knownPackages
drwxr-xr-x   7 rigor789  staff  224 Jan  4 14:01 .temp
drwxr-xr-x   8 rigor789  staff  256 Jan  4 14:00 build-tools
drwxr-xr-x  20 rigor789  staff  640 Jan  4 14:01 emulator
drwxr-xr-x   3 rigor789  staff   96 Sep  8 16:27 extras
drwxr-xr-x   3 rigor789  staff   96 Sep  8 17:03 licenses
drwxr-xr-x   3 rigor789  staff   96 Sep  8 16:27 patcher
drwxr-xr-x  20 rigor789  staff  640 Jan  4 14:01 platform-tools
drwxr-xr-x   5 rigor789  staff  160 Dec 28 14:01 platforms
drwxr-xr-x  30 rigor789  staff  960 Sep  8 16:56 skins
drwxr-xr-x   3 rigor789  staff   96 Sep  8 16:57 system-images
drwxr-xr-x  14 rigor789  staff  448 Sep  8 16:27 tools

If you get ls: /android-sdk/: No such file or directory then that's not the correct folder - find where you have the sdk and update the variable.

viradiyas@viradiyas:/opt$ ls
viradiyas@viradiyas:/opt$ ls
android-sdk google node skypeforlinux toptracker yakyak

Above path set android sdk

So set ANDROID_HOME to /opt/android-sdk...

Was this page helpful?
0 / 5 - 0 ratings