Hello, I previously installed the Ghost-CLI on my Ubuntu 20.04 server using sudo npm install ghost-cli@latest -g but now I would like to uninstall it, I already did npm uninstall but if I run command -v ghost I get: /usr/bin/ghost as a result which suggests is still installed or at least “half” installed
Does anyone know how to completely remove it? I would like to install an older version of the Ghost-CLI if possible cause I want to install Ghost 1.20.3 and I don’t think it can be done using the newest version of the CLI
Thanks in advance.
You can install an older version of the cli by running sudo npm i -g ghost-cli@{version}
To uninstall, don’t forget the -g
flag 
is it possible to have different ghost-cli versions installed and switch between them, just like nvm with node (node version manager)
No, since you should always be using the latest version, unless you have a really old instance
. The closest thing you can get to this is something like this:
mkdir ~/ghost-cli-versions
cd ~/ghost-cli-version
mkdir {version}
cd {version}
npm install ghost-cli@{version}
cd ..
ln -s ~/ghost-cli-versions/{version}/node_modules/.bin/ghost ghost-{version}
Then you could run ~/ghost-cli-versions/ghost-{version}
to do something.