I am unable to uninstall truffle using this command

npm uninstall -g truffle

Current ver is 4.1.5 , I want to uninstall and reinstall v4.1.4 as code seems to be breaking while compiling and v4.1.4 may help as per the suggestions in this forum. While running the above it says "up to date in 0.141s (sec keep changing)".

System is ubuntu 16.04 (32-bit)

Thank you

  • If you execute npm ls -g --depth 0 does truffle appears in that list? Check if your users have permissions to modify npm directory npm get prefix.
    – Ismael
    Apr 17 '18 at 19:23
  • npm ls -g --depth 0 --> gave .nvm/versions/node/v8.11.1/lib `-- npm@5.8.0 and no truffle npm get prefix --> gave .nvm/versions/node/v8.11.1 thank you
    – sv2011
    Apr 17 '18 at 23:21
  • If truffle didn't appear in npm ls -g then it is not installed. Why do you believe it still is installed?
    – Ismael
    Apr 18 '18 at 1:56
  • I had installed it, also its shows version and earlier when i compile other program with truffle it was working when i do truffle version it gives Truffle v4.1.5 (core: 4.1.5) Solidity v0.4.21 (solc-js)
    – sv2011
    Apr 18 '18 at 2:33
  • Try running where truffle to determine where it is installed.
    – Ismael
    Apr 18 '18 at 2:53

For other people's convenience who has similar problem:

  1. Look for where the truffle exists:
$ whereis truffle

if you use zsh, try this:

$ where truffle
  1. Locate to the directory, and delete it.

  2. Re-install with npm



npm install truffle@4.1.4 -g

I think this should work even without removing the current version you have

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.