How to remove Homebridge on Raspberry Pi

Husar picture Husar · Dec 27, 2016 · Viewed 26.2k times · Source

How can I remove Homebridge from a Raspberry Pi 3. I have attempted the following without any luck.

pi@Development:~ $ sudo npm uninstall homebridge
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

I have also attempted to remove it not as sudo. A much longer result but still no luck.

pi@Development:~ $ npm uninstall homebridge
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.
npm ERR! Linux 4.4.21-v7+
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "uninstall" "homebridge"
npm ERR! node v7.3.0
npm ERR! npm v4.0.5
npm ERR! path /home/pi/node_modules/.staging
npm ERR! code EACCES
npm ERR! errno -13
npm ERR! syscall mkdir
npm ERR! Error: EACCES: permission denied, mkdir '/home/pi/node_modules/.staging'
npm ERR! { Error: EACCES: permission denied, mkdir '/home/pi/node_modules/.staging'
npm ERR! errno: -13,
npm ERR! code: 'EACCES',
npm ERR! syscall: 'mkdir',
npm ERR! path: '/home/pi/node_modules/.staging' }
npm ERR! 
npm ERR! Please try running this command again as root/Administrator 
npm ERR! Please include the following file with any support request:
npm ERR! /home/pi/npm-debug.log

Answer

Rafael Trestini picture Rafael Trestini · Jul 30, 2017

You can do it globally as root:

sudo npm uninstall -g homebridge

Homebridge's configuration files are stored in ~/.homebridge (if you're using default user "pi", the directory is /home/pi/.homebridge)