Skip to content

Instantly share code, notes, and snippets.

@narfel
Last active July 11, 2024 14:57
Show Gist options
  • Save narfel/035944cbf8475b29621a7a5dff00d97f to your computer and use it in GitHub Desktop.
Save narfel/035944cbf8475b29621a7a5dff00d97f to your computer and use it in GitHub Desktop.
It's been a while since this gist was written. In the meantime the package homeassistant-supervised apt
package was introduced for debian based systems. If you used that way the first thing you should do use
the normal package uninstaller with something like: (sudo) apt remove homeassistant-supervised
If for some reason that doesn't work proceed with the below instructions for a manual cleanup.
1) stop services:
sudo systemctl stop hassio-supervisor.service
sudo systemctl stop hassio-apparmor.service
2) disable services:
sudo systemctl disable hassio-supervisor.service
sudo systemctl disable hassio-apparmor.service
3) remove services:
sudo rm -rf /etc/systemd/system/hassio-supervisor.service
sudo rm -rf /etc/systemd/system/hassio-apparmor.service
4) removing folders:
sudo rm -rf /usr/sbin/hassio-supervisor
sudo rm -rf /usr/sbin/hassio-apparmor
5) remove containers/images
@charlierh
Copy link

hello thanks,

works for me except the number (5), i got this
remove: not found

@narfel
Copy link
Author

narfel commented Feb 10, 2022

Yeah, that's not a command, just a general sentence.
To remove all stopped containers use:
docker container prune
To list the images (because there might be ones you want to keep), do:
docker images
then remove the ones you want with:
docker rmi < Image ID>

@charlierh
Copy link

charlierh commented Feb 10, 2022

ohh i get it...

sudo docker container rm container-ID1 container-ID2........ container-IDn

thanks!!!

@DrSchmurge
Copy link

thanks, useful thread

@forzagreen
Copy link

apt remove homeassistant-supervised
Then remove containers and images

@narfel
Copy link
Author

narfel commented Apr 28, 2022

@forzagreen That's specific to the homeassistant-supervisor.deb installation. That works if you are on debian and used this specific installer.

@polyphonic13
Copy link

thank you for this!

@hosquiat
Copy link

apt remove homeassistant-supervised

added sudo and it removed some additional dependencies:

sogeniusio@srv:~$ sudo apt remove homeassistant-supervised
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
  homeassistant-supervised
0 upgraded, 0 newly installed, 1 to remove and 28 not upgraded.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 157313 files and directories currently installed.)
Removing homeassistant-supervised (1.0.2) ...
[info] Undo divert on remove
Removing 'diversion of /etc/NetworkManager/NetworkManager.conf to /etc/NetworkManager/NetworkManager.conf.real by homeassistant-supervised'
Removing 'diversion of /etc/NetworkManager/system-connections/default to /etc/NetworkManager/system-connections/default.real by homeassistant-supervised'
Removing 'diversion of /etc/docker/daemon.json to /etc/docker/daemon.json.real by homeassistant-supervised'
Removing 'diversion of /etc/network/interfaces to /etc/network/interfaces.real by homeassistant-supervised'

@cshaa
Copy link

cshaa commented Mar 17, 2023

This is what I did to remove Home Assistant 2023 Core from my system:

sudo systemctl stop hass.service
sudo systemctl disable hass.service
sudo rm -rf /etc/systemd/system/multi-user.target.wants/hass.service
sudo userdel -r homeassistant
sudo rm -rf /srv/homeassistant

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment