Do yourself a favor and login as root to save yourself some time and headaches:
$ sudo su -Install unattended-upgrades:
| # Import the RPi.GPIO and OS | |
| import RPi.GPIO as GPIO | |
| import os | |
| import sys | |
| import time | |
| # GPIO port setup | |
| GPIO.setmode(GPIO.BCM) | |
| # Power switch: will send a shutdown message to the OS |
| #!/usr/bin/env node | |
| 'use strict'; | |
| const chalk = require('chalk'); | |
| const del = require('del'); | |
| const fs = require('fs'); | |
| const google = require('googleapis'); | |
| const googleAuth = require('google-auth-library'); | |
| const _ = require('lodash'); |
| # first: | |
| lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done | |
| sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.* | |
| # To recap, the best way (I've found) to completely uninstall node + npm is to do the following: | |
| # go to /usr/local/lib and delete any node and node_modules | |
| cd /usr/local/lib | |
| sudo rm -rf node* |