7

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
Husar
  • 413
  • 1
  • 6
  • 17

3 Answers3

9

Try one of these, they seemed to work for me when nothing else did. (Or at least I didn't get error messages, and when I tried to get back into Homebridge, I DID get an error so I think it worked.)

To remove the Homebridge service run this:

sudo hb-service uninstall

To remove Homebridge and Homebridge Config UI X run this:

sudo npm uninstall -g homebridge homebridge-config-ui-x
Bernhard Stadler
  • 1,725
  • 14
  • 24
Beth Younker
  • 91
  • 1
  • 1
8

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)

Rafael Trestini
  • 379
  • 4
  • 11
0

None of these work for me, after uninstalling homebridge, homebridge is still in /usr/local/bin/ along with hb-config. I need to completely remove it so I can try reinstalling it since it’s completely b0rked.

     pi@pi4 % sudo npm uninstall -g homebridge homebridge-config-ui    
up to date, audited 1 package in 878ms

found 0 vulnerabilities
 pi@pi4 % ls -ls /usr/local/bin/homebridge
0 lrwxrwxrwx 1 root root 45 Oct  2  2019 /usr/local/bin/homebridge -> ../lib/node_modules/homebridge/bin/homebridge
 pi@pi4 %
lbutlr
  • 414
  • 6
  • 18