How to completely remove Home Assistant from a RapsberryPI

Hello,
I would like a new clean installation in a RPI 4.
I cant figure it out how to completely uninstall Home Assistant.
Any help would be a great help.
Regards,
Gilson

Just take the card out and format it surely? Start with a fresh install of whatever OS you want to use next.

My card is not for HomeAssistant only. I need to remove it manually.

1 Like

What installation method have you used to install Home Assistant? For instance, my installation method was a Python virtual environment. So to remove, I would need to stop the hass service, remove or permanently disable the service, delete the venv, delete the home assistant user and its home directory. In my case, that would still leave behind the custom python3.8 binaries I installed this past winter to support recent HA version(since I did not want to change from the raspbian OS at that time) , as well as various other apt and python dependencies I might not need any longer, but that aren’t strictly Home Assistant -related.

The same as yours @gonzotek
Could you guide through all the steps, with command line?
I am completely newbie in linux/raspian

Do you want a clean Home Assistant install or a clean RPi OS install? You can achieve a clean HA install fairly easily without completely nuking everything.

But even before that, the very first thing you should do so can feel comfortable with the process, is to create a good backup of the whole card/disk. That way you can just write the original image back if anything goes south..

Then you can just move the Home Assistant venv folder and Home Assistant config directories, then follow the venv install process as though it were a new install. If you followed this guide:

then the venv is located at

/srv/homeassistant

and the config directory would be

/home/homeassistant/.homeassistant

So you could just move the old directories out of the way:

sudo mv /srv/homeassistant /srv/homeassistant-old
sudo mv /home/homeassistant/.homeassistant /home/homeassistant/.homeassistant-old

Another big note, as I mentioned, my install has a custom python3.8 package a community member built:

It’s important if you installed Home Assistant on Raspbian Buster before ~Dec. 2020, because you’d probably be running 3.7, which Home Assistant no longer supports.

1 Like