Uninstall fails on Intel iMac


I am trying to uninstall metadata from an Inl=tel iMac, but I get the following error:

12:03 $ wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --uninstall
--2023-09-14 12:04:17--  https://my-netdata.io/kickstart.sh
Resolving my-netdata.io (my-netdata.io)...,
Connecting to my-netdata.io (my-netdata.io)||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]
Saving to: ‘/tmp/netdata-kickstart.sh’

/tmp/netdata-kickstart.sh                           [ <=>                                                                                                    ]  82.96K  --.-KB/s    in 0.001s  

2023-09-14 12:04:17 (130 MB/s) - ‘/tmp/netdata-kickstart.sh’ saved [84946]

 --- Using /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI as a temporary directory. --- 
 --- Checking for existing installations of Netdata... --- 
 --- Downloading netdata-uninstaller ... --- 
[/var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI]$ /usr/bin/curl --fail -q -sSL --connect-timeout 10 --retry 3 --output /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI/netdata-uninstaller.sh https://raw.githubusercontent.com/netdata/netdata/master/packaging/installer/netdata-uninstaller.sh 

[/var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI]$ sudo /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI/netdata-uninstaller.sh --yes 
/var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI/netdata-uninstaller.sh: line 711: /etc/netdata/.environment: No such file or directory

Thu Sep 14 12:04:29 CEST 2023 : FATAL: netdata-uninstaller.sh: FAILED TO UNINSTALL NETDATA:  Failed to completely remove Netdata from this system.

Finished uninstalling the Netdata Agent.The following non-fatal warnings or errors were encountered:

  - Command "sudo /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI/netdata-uninstaller.sh --yes" failed with exit code 1.

Root privileges required to run rm -rf /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI
[/Users/rainer]$ sudo rm -rf /var/folders/5k/g8z_7q3d6vb54m8k0cjy940r0000gq/T/netdata-kickstart-XXXXXXXXXX.dim9AxCI 

✔ ~ 
12:04 $  

Any suggestions how I can remove netdata? It is not needed anymore on that computer.



Hi @rkrug

Can we assume you initially installed using the kickstart script? Is currently netdata under /usr/sbin/netdata ?

Yes. This is the case. (as far as I remember, and homebrew Netdata is not installed - so it should be the official installer).

I have a similar problem on a Linux Mint based PC/Laptop. And then trying to do a ‘clean’ install which appears to complete I get a bunch of SQLite database errors. So I cannot uninstall or do a clean re-install.