How to uninstall a node.js module?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP








up vote
1
down vote

favorite












I have a Ubuntu 16.04 server with a Drupal 8.4 site



I want to install Node.js for my site.



1) I connected to my server with root and I entered the following command at the root of my server :



root@vps000000:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
root@vps000000:~# apt-get install -y nodejs


The installation went well.



2) I'm installing now drupal-node.js :



root@vps000000~# npm install drupal-node.js


The problem is that I was wrong location for installing the module drupal-node.js. In effect it should be in the drupal site folder.



I executed the following command to uninstall it :



root@vps000000~# npm uninstall drupal-node.js


The module is uninstalled, but the node_modules folder and the package-lock.json file are still there :



root@vps000000:~# ls
dead.letter drupal.phar installer_la_cle.sh node_modules package-lock.json


Here is the content of the directory node_modules :



root@vps000000:~/node_modules# ls
accepts caseless engine.io hawk media-typer process-nextick-args supports-color
after chalk engine.io-client hoek merge-descriptors proxy-addr to-array
ansi-regex combined-stream engine.io-parser http-errors methods qs tough-cookie
ansi-styles commander escape-html http-signature mime range-parser tunnel-agent
arraybuffer.slice component-bind escape-string-regexp iconv-lite mime-db raw-body tweetnacl
array-flatten component-emitter etag indexof mime-types readable-stream type-is
asn1 component-inherit express inherits ms request ultron
assert-plus content-disposition extend ipaddr.js negotiator safe-buffer unpipe
async content-type extsprintf isarray node-uuid send util-deprecate
aws-sign2 cookie finalhandler is-my-ip-valid oauth-sign serve-static utils-merge
backo2 cookie-signature forever-agent is-my-json-valid object-assign setprototypeof vary
base64-arraybuffer core-util-is form-data is-property object-component sntp verror
base64id cryptiles forwarded isstream on-finished socket.io ws
bcrypt-pbkdf dashdash fresh is-typedarray options socket.io-adapter wtf-8
better-assert debug generate-function jsbn parsejson socket.io-client xmlhttprequest-ssl
bl delayed-stream generate-object-property json3 parseqs socket.io-parser xtend
blob depd getpass jsonpointer parseuri sshpk yeast
body-parser destroy har-validator json-schema parseurl statuses
boom ecc-jsbn has-ansi json-stringify-safe path-to-regexp string_decoder
bytes ee-first has-binary jsprim pinkie stringstream
callsite encodeurl has-cors lodash pinkie-promise strip-ansi


I know how to install drupal-node.js in my drupal site. How to uninstall it completely from my root directory ?



Should he just do rm -r ?










share|improve this question



























    up vote
    1
    down vote

    favorite












    I have a Ubuntu 16.04 server with a Drupal 8.4 site



    I want to install Node.js for my site.



    1) I connected to my server with root and I entered the following command at the root of my server :



    root@vps000000:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
    root@vps000000:~# apt-get install -y nodejs


    The installation went well.



    2) I'm installing now drupal-node.js :



    root@vps000000~# npm install drupal-node.js


    The problem is that I was wrong location for installing the module drupal-node.js. In effect it should be in the drupal site folder.



    I executed the following command to uninstall it :



    root@vps000000~# npm uninstall drupal-node.js


    The module is uninstalled, but the node_modules folder and the package-lock.json file are still there :



    root@vps000000:~# ls
    dead.letter drupal.phar installer_la_cle.sh node_modules package-lock.json


    Here is the content of the directory node_modules :



    root@vps000000:~/node_modules# ls
    accepts caseless engine.io hawk media-typer process-nextick-args supports-color
    after chalk engine.io-client hoek merge-descriptors proxy-addr to-array
    ansi-regex combined-stream engine.io-parser http-errors methods qs tough-cookie
    ansi-styles commander escape-html http-signature mime range-parser tunnel-agent
    arraybuffer.slice component-bind escape-string-regexp iconv-lite mime-db raw-body tweetnacl
    array-flatten component-emitter etag indexof mime-types readable-stream type-is
    asn1 component-inherit express inherits ms request ultron
    assert-plus content-disposition extend ipaddr.js negotiator safe-buffer unpipe
    async content-type extsprintf isarray node-uuid send util-deprecate
    aws-sign2 cookie finalhandler is-my-ip-valid oauth-sign serve-static utils-merge
    backo2 cookie-signature forever-agent is-my-json-valid object-assign setprototypeof vary
    base64-arraybuffer core-util-is form-data is-property object-component sntp verror
    base64id cryptiles forwarded isstream on-finished socket.io ws
    bcrypt-pbkdf dashdash fresh is-typedarray options socket.io-adapter wtf-8
    better-assert debug generate-function jsbn parsejson socket.io-client xmlhttprequest-ssl
    bl delayed-stream generate-object-property json3 parseqs socket.io-parser xtend
    blob depd getpass jsonpointer parseuri sshpk yeast
    body-parser destroy har-validator json-schema parseurl statuses
    boom ecc-jsbn has-ansi json-stringify-safe path-to-regexp string_decoder
    bytes ee-first has-binary jsprim pinkie stringstream
    callsite encodeurl has-cors lodash pinkie-promise strip-ansi


    I know how to install drupal-node.js in my drupal site. How to uninstall it completely from my root directory ?



    Should he just do rm -r ?










    share|improve this question

























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I have a Ubuntu 16.04 server with a Drupal 8.4 site



      I want to install Node.js for my site.



      1) I connected to my server with root and I entered the following command at the root of my server :



      root@vps000000:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
      root@vps000000:~# apt-get install -y nodejs


      The installation went well.



      2) I'm installing now drupal-node.js :



      root@vps000000~# npm install drupal-node.js


      The problem is that I was wrong location for installing the module drupal-node.js. In effect it should be in the drupal site folder.



      I executed the following command to uninstall it :



      root@vps000000~# npm uninstall drupal-node.js


      The module is uninstalled, but the node_modules folder and the package-lock.json file are still there :



      root@vps000000:~# ls
      dead.letter drupal.phar installer_la_cle.sh node_modules package-lock.json


      Here is the content of the directory node_modules :



      root@vps000000:~/node_modules# ls
      accepts caseless engine.io hawk media-typer process-nextick-args supports-color
      after chalk engine.io-client hoek merge-descriptors proxy-addr to-array
      ansi-regex combined-stream engine.io-parser http-errors methods qs tough-cookie
      ansi-styles commander escape-html http-signature mime range-parser tunnel-agent
      arraybuffer.slice component-bind escape-string-regexp iconv-lite mime-db raw-body tweetnacl
      array-flatten component-emitter etag indexof mime-types readable-stream type-is
      asn1 component-inherit express inherits ms request ultron
      assert-plus content-disposition extend ipaddr.js negotiator safe-buffer unpipe
      async content-type extsprintf isarray node-uuid send util-deprecate
      aws-sign2 cookie finalhandler is-my-ip-valid oauth-sign serve-static utils-merge
      backo2 cookie-signature forever-agent is-my-json-valid object-assign setprototypeof vary
      base64-arraybuffer core-util-is form-data is-property object-component sntp verror
      base64id cryptiles forwarded isstream on-finished socket.io ws
      bcrypt-pbkdf dashdash fresh is-typedarray options socket.io-adapter wtf-8
      better-assert debug generate-function jsbn parsejson socket.io-client xmlhttprequest-ssl
      bl delayed-stream generate-object-property json3 parseqs socket.io-parser xtend
      blob depd getpass jsonpointer parseuri sshpk yeast
      body-parser destroy har-validator json-schema parseurl statuses
      boom ecc-jsbn has-ansi json-stringify-safe path-to-regexp string_decoder
      bytes ee-first has-binary jsprim pinkie stringstream
      callsite encodeurl has-cors lodash pinkie-promise strip-ansi


      I know how to install drupal-node.js in my drupal site. How to uninstall it completely from my root directory ?



      Should he just do rm -r ?










      share|improve this question















      I have a Ubuntu 16.04 server with a Drupal 8.4 site



      I want to install Node.js for my site.



      1) I connected to my server with root and I entered the following command at the root of my server :



      root@vps000000:~# curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
      root@vps000000:~# apt-get install -y nodejs


      The installation went well.



      2) I'm installing now drupal-node.js :



      root@vps000000~# npm install drupal-node.js


      The problem is that I was wrong location for installing the module drupal-node.js. In effect it should be in the drupal site folder.



      I executed the following command to uninstall it :



      root@vps000000~# npm uninstall drupal-node.js


      The module is uninstalled, but the node_modules folder and the package-lock.json file are still there :



      root@vps000000:~# ls
      dead.letter drupal.phar installer_la_cle.sh node_modules package-lock.json


      Here is the content of the directory node_modules :



      root@vps000000:~/node_modules# ls
      accepts caseless engine.io hawk media-typer process-nextick-args supports-color
      after chalk engine.io-client hoek merge-descriptors proxy-addr to-array
      ansi-regex combined-stream engine.io-parser http-errors methods qs tough-cookie
      ansi-styles commander escape-html http-signature mime range-parser tunnel-agent
      arraybuffer.slice component-bind escape-string-regexp iconv-lite mime-db raw-body tweetnacl
      array-flatten component-emitter etag indexof mime-types readable-stream type-is
      asn1 component-inherit express inherits ms request ultron
      assert-plus content-disposition extend ipaddr.js negotiator safe-buffer unpipe
      async content-type extsprintf isarray node-uuid send util-deprecate
      aws-sign2 cookie finalhandler is-my-ip-valid oauth-sign serve-static utils-merge
      backo2 cookie-signature forever-agent is-my-json-valid object-assign setprototypeof vary
      base64-arraybuffer core-util-is form-data is-property object-component sntp verror
      base64id cryptiles forwarded isstream on-finished socket.io ws
      bcrypt-pbkdf dashdash fresh is-typedarray options socket.io-adapter wtf-8
      better-assert debug generate-function jsbn parsejson socket.io-client xmlhttprequest-ssl
      bl delayed-stream generate-object-property json3 parseqs socket.io-parser xtend
      blob depd getpass jsonpointer parseuri sshpk yeast
      body-parser destroy har-validator json-schema parseurl statuses
      boom ecc-jsbn has-ansi json-stringify-safe path-to-regexp string_decoder
      bytes ee-first has-binary jsprim pinkie stringstream
      callsite encodeurl has-cors lodash pinkie-promise strip-ansi


      I know how to install drupal-node.js in my drupal site. How to uninstall it completely from my root directory ?



      Should he just do rm -r ?







      16.04 server apache2 nodejs npm






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Feb 21 at 16:06

























      asked Feb 21 at 14:12









      1ad9ac48

      63




      63




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          Check out the Marked Answer here



          sudo apt-get remove nodejs

          sudo apt-get remove npm


          Also in the comments carry out some additional clean up



          sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

          sudo rm -rf /usr/local/lib/node*

          sudo rm -rf /usr/local/include/node*

          sudo rm -rf /usr/local/bin/node*


          HTH






          share|improve this answer




















          • Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
            – 1ad9ac48
            Feb 21 at 17:10










          • Surely then just sudo rm -rf node_modules from your root directory will do that ?
            – Gary Woodfine
            Feb 21 at 21:50










          • Thank you i did rm -R node_modules what serves -rf ?
            – 1ad9ac48
            Feb 21 at 22:29










          • I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
            – 1ad9ac48
            Feb 21 at 22:50











          • rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
            – Gary Woodfine
            Feb 22 at 9:32











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "89"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1008400%2fhow-to-uninstall-a-node-js-module%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          Check out the Marked Answer here



          sudo apt-get remove nodejs

          sudo apt-get remove npm


          Also in the comments carry out some additional clean up



          sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

          sudo rm -rf /usr/local/lib/node*

          sudo rm -rf /usr/local/include/node*

          sudo rm -rf /usr/local/bin/node*


          HTH






          share|improve this answer




















          • Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
            – 1ad9ac48
            Feb 21 at 17:10










          • Surely then just sudo rm -rf node_modules from your root directory will do that ?
            – Gary Woodfine
            Feb 21 at 21:50










          • Thank you i did rm -R node_modules what serves -rf ?
            – 1ad9ac48
            Feb 21 at 22:29










          • I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
            – 1ad9ac48
            Feb 21 at 22:50











          • rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
            – Gary Woodfine
            Feb 22 at 9:32















          up vote
          1
          down vote













          Check out the Marked Answer here



          sudo apt-get remove nodejs

          sudo apt-get remove npm


          Also in the comments carry out some additional clean up



          sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

          sudo rm -rf /usr/local/lib/node*

          sudo rm -rf /usr/local/include/node*

          sudo rm -rf /usr/local/bin/node*


          HTH






          share|improve this answer




















          • Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
            – 1ad9ac48
            Feb 21 at 17:10










          • Surely then just sudo rm -rf node_modules from your root directory will do that ?
            – Gary Woodfine
            Feb 21 at 21:50










          • Thank you i did rm -R node_modules what serves -rf ?
            – 1ad9ac48
            Feb 21 at 22:29










          • I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
            – 1ad9ac48
            Feb 21 at 22:50











          • rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
            – Gary Woodfine
            Feb 22 at 9:32













          up vote
          1
          down vote










          up vote
          1
          down vote









          Check out the Marked Answer here



          sudo apt-get remove nodejs

          sudo apt-get remove npm


          Also in the comments carry out some additional clean up



          sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

          sudo rm -rf /usr/local/lib/node*

          sudo rm -rf /usr/local/include/node*

          sudo rm -rf /usr/local/bin/node*


          HTH






          share|improve this answer












          Check out the Marked Answer here



          sudo apt-get remove nodejs

          sudo apt-get remove npm


          Also in the comments carry out some additional clean up



          sudo rm -rf /usr/local/bin/npm /usr/local/share/man/man1/node* /usr/local/lib/dtrace/node.d ~/.npm ~/.node-gyp /opt/local/bin/node /opt/local/include/node /opt/local/lib/node_modules 

          sudo rm -rf /usr/local/lib/node*

          sudo rm -rf /usr/local/include/node*

          sudo rm -rf /usr/local/bin/node*


          HTH







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 21 at 17:01









          Gary Woodfine

          1314




          1314











          • Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
            – 1ad9ac48
            Feb 21 at 17:10










          • Surely then just sudo rm -rf node_modules from your root directory will do that ?
            – Gary Woodfine
            Feb 21 at 21:50










          • Thank you i did rm -R node_modules what serves -rf ?
            – 1ad9ac48
            Feb 21 at 22:29










          • I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
            – 1ad9ac48
            Feb 21 at 22:50











          • rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
            – Gary Woodfine
            Feb 22 at 9:32

















          • Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
            – 1ad9ac48
            Feb 21 at 17:10










          • Surely then just sudo rm -rf node_modules from your root directory will do that ?
            – Gary Woodfine
            Feb 21 at 21:50










          • Thank you i did rm -R node_modules what serves -rf ?
            – 1ad9ac48
            Feb 21 at 22:29










          • I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
            – 1ad9ac48
            Feb 21 at 22:50











          • rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
            – Gary Woodfine
            Feb 22 at 9:32
















          Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
          – 1ad9ac48
          Feb 21 at 17:10




          Thank you, but I just want to remove the node-drupal.js module and the node_modules folder that was installed with it. Because they were not installed in the right place.
          – 1ad9ac48
          Feb 21 at 17:10












          Surely then just sudo rm -rf node_modules from your root directory will do that ?
          – Gary Woodfine
          Feb 21 at 21:50




          Surely then just sudo rm -rf node_modules from your root directory will do that ?
          – Gary Woodfine
          Feb 21 at 21:50












          Thank you i did rm -R node_modules what serves -rf ?
          – 1ad9ac48
          Feb 21 at 22:29




          Thank you i did rm -R node_modules what serves -rf ?
          – 1ad9ac48
          Feb 21 at 22:29












          I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
          – 1ad9ac48
          Feb 21 at 22:50





          I have reinstalled the module in the correct directory, but I can not configure it. Maybe you have an idea ? stackoverflow.com/questions/48910412/…
          – 1ad9ac48
          Feb 21 at 22:50













          rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
          – Gary Woodfine
          Feb 22 at 9:32





          rm -rf enables the force remove directory . quick reference cheat sheets I have to be honest I don't really know what you mean by configuring the module ? I thought if you are making use of Node Module it is in an application, so you make use of it in code?
          – Gary Woodfine
          Feb 22 at 9:32


















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1008400%2fhow-to-uninstall-a-node-js-module%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          pylint3 and pip3 broken

          Missing snmpget and snmpwalk

          How to enroll fingerprints to Ubuntu 17.10 with VFS491