{"id":80,"date":"2021-02-09T08:49:47","date_gmt":"2021-02-09T08:49:47","guid":{"rendered":"https:\/\/codecasm.com\/blogs\/?p=80"},"modified":"2021-02-09T08:49:47","modified_gmt":"2021-02-09T08:49:47","slug":"nodejs-install-uninstall-reinstall-on-linux-based-system","status":"publish","type":"post","link":"https:\/\/codecasm.com\/blogs\/nodejs-install-uninstall-reinstall-on-linux-based-system\/","title":{"rendered":"NodeJS : Install, Uninstall, Reinstall on Linux based system"},"content":{"rendered":"\n<h3 class=\"wp-block-heading\">Installing nodejs on your system<\/h3>\n\n\n\n<p>Run the below commands to quickly get started<\/p>\n\n\n\n<p><code>sudo apt-get update<br>sudo apt-get install nodejs<\/code><br><br>in case you need specific version, the command be like below, otherwise continue from <code>npm<\/code>:<br><br><code>curl -sL https:\/\/deb.nodesource.com\/setup_14.x | sudo bash -<\/code><br><br>Now, check the nodesource list:<br><code><br>cat \/etc\/apt\/sources.list.d\/nodesource.list<br><\/code><br>And, firing below command will install you specific version:<br><code>sudo apt -y install nodejs<\/code><\/p>\n\n\n\n<p>Then check whether node is installed or not:<\/p>\n\n\n\n<p><code>node -v<\/code><br><br>If installed correctly, it should show node&#8217;s installed version [<em>in my case, it is 14.15.4<\/em>]<\/p>\n\n\n\n<p>Again check whether npm is installed or not:<\/p>\n\n\n\n<p><code>npm -v<\/code><\/p>\n\n\n\n<p>The above command shows version, if not, fire below command to get it installed<\/p>\n\n\n\n<p><code>sudo apt-get install npm<\/code><br><br>Once, installed check the version using <code>npm -v<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Removing nodejs from your system<\/h3>\n\n\n\n<p>If you want to uninstall proceed with the following steps, or if you want to reinstall then follow below steps and then again install it. So, let&#8217;s begin:<\/p>\n\n\n\n<p><code>sudo apt-get purge nodejs<\/code><\/p>\n\n\n\n<p>above command will only remove the node related packages<\/p>\n\n\n\n<p><code>sudo apt-get purge --auto-remove nodejs<\/code><\/p>\n\n\n\n<p>This command will remove the dependencies which are not needed as we have uninstalled nodejs<\/p>\n\n\n\n<p>Collectively we can fire this command as<\/p>\n\n\n\n<p><code>sudo apt-get purge --auto-remove nodejs<\/code><\/p>\n\n\n\n<p>But, in case, you need more cautions, proceed in two steps only [<strong><em>Recommended<\/em><\/strong>]:<\/p>\n\n\n\n<p><code>sudo apt-get purge nodejs<br>sudo apt-get autoremove<\/code><\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>Thanks for being here, Hope you liked it. <\/p>\n\n\n\n<p>Comment what you need more in upcoming blogs<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Installing nodejs on your system Run the below commands to quickly get started sudo apt-get updatesudo apt-get install nodejs in case you need specific version, the command be like below, otherwise continue from npm: curl -sL https:\/\/deb.nodesource.com\/setup_14.x | sudo bash &#8211; Now, check the nodesource list:cat \/etc\/apt\/sources.list.d\/nodesource.listAnd, firing below command will install you specific version:sudo [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":83,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[4,30,29,31],"tags":[33,32],"class_list":["post-80","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-javascript","category-linux","category-node","category-ubuntu","tag-node","tag-ubuntu"],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/codecasm.com\/blogs\/wp-content\/uploads\/2021\/02\/Installation-Uninstallation-Guide.png?fit=2240%2C1260&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/posts\/80","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/comments?post=80"}],"version-history":[{"count":3,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/posts\/80\/revisions"}],"predecessor-version":[{"id":84,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/posts\/80\/revisions\/84"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/media\/83"}],"wp:attachment":[{"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/media?parent=80"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/categories?post=80"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/codecasm.com\/blogs\/wp-json\/wp\/v2\/tags?post=80"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}