如何在Raspberry Pi上删除Homebridge

时间:2016-12-27 15:35:23

标签: raspberry-pi3

如何从Raspberry Pi 3中删除Homebridge。我尝试了以下但没有运气。

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.

我还尝试将其删除为sudo。更长的结果,但仍然没有运气。

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

2 个答案:

答案 0 :(得分:4)

您可以以root身份全局执行此操作:

sudo npm uninstall -g homebridge

Homebridge的配置文件存储在〜/ .homebridge中(如果您使用的是默认用户“pi”,目录是/home/pi/.homebridge)

答案 1 :(得分:1)

尝试其中一种方法,它们似乎无济于事。 (或者至少我没有收到错误消息,当我尝试返回Homebridge时,我DID收到了一个错误,因此我认为它可以正常工作。)

要删除Homebridge服务,请运行以下命令:

sudo hb-service uninstall

要删除Homebridge和Homebridge Config UI X,请运行以下命令:

sudo npm uninstall -g homebridge homebridge-config-ui-x