Cant remove HACS integration? SOLVED

I have a weird issue where the I cannot remove HACs no matter what I try.
It’s shown in integrations, but I can’t delete from there (screenshot).
It’s not showing in my configs yaml files as a manual setup
I’ve tried removing all files I can find and have had no luck removing it.

Any suggestions?

Screenshot 2021-05-10 105709

There are removal instructions on hacs.xyz

Those instructions cover only two scenarios, 1) deleting from YAML and 2) deleting the integration element. Neither of those appear to be an option for me - there’s no Hacs reference in YAML anywhere I can see, and the integration has no delete options.

I cannot work out what to do next :-/

What from the instructions have you done exactly?

  1. Remove the configuration from configuration.yaml (if configured with legacy (YAML)) or remove it using the trashbin icon on the integration page.
  2. Restart Home Assistant important
  3. Restart Home Assistant (yes, this needs to be done twice) important
  4. Delete the hacs directory under custom_components.
  5. Delete all files and directories containing hacs under the .storage directory.
  6. Restart Home Assistant.

When removed the wrong way. An option is to install it again. Just move hacs back to custom components and reboot. And start the remove procedure again.

And have you done the mentioned re-install and tried the procedure again and exactly as stated? :slight_smile:

I fail at step 1. There isn’t anything in the configuration.yaml and I have no delete options in the integration page. The reinstall option fails with an error.

In the integration page at the bottom right of the HACS entry there should be an overflow menu(3 vertical dots). Click it, and choose delete.

1 Like

What you see in the original image I posted is what I see on the integration page. Everything else has the 3 dot menu, but not HACs. I’m tearing my hair out trying to work out how to solve this one now.

If I try and reinstall the integration I get the error “Config flow could not be loaded” after a long timeout.

Ok, I finally managed to solve my issue. In case this helps anyone else.

Ultimately I had to manually install the HACs files.

  • Removed any HAC’s files from the sever (as per the uninstall instructions final sections) and rebooted. This left the integration hanging with errors (as it already was)
  • I downloaded the install script and found the latest HACs zip file and downloaded/unzipped it. Using the samba addon I transferred the HAC’s folder into /config/custom_components
  • a reboot threw the existing errors again.
  • I added the HACS config manually into YAML and rebooted twice.
  • At this point HACS threw errors and failed to run, but the 3 dot menu had reappeared giving me the option to select “reinstall” - so I did this and it reinstalled itself.
  • Reboot gave now gave me new errors (something about versions numbers missing in the manifset file).
  • I removed the manual YAML config and rebooted.
  • Following the reboot, I could then correctly configure HACS through the config/integration page.
  • I’ve run a full backup of the running system as a good place to snapshot the SD card :slight_smile:

Phew - hope that helps someone else. I have no idea the root cause, so it may not be the same for you, but I eventually got there.


From a later reply to keep this solution accurate:

One thing to add. About a week later the issue re-occurred. I have no idea why. I ended up having to do the same process again to fix. However the 2nd time around, once it was up and working properly I took the opportunity to do the uninstall process listed on HACS to clean it out entirely. I then did a complete reinstall of HACS from fresh. It seems far more stable from a complete reinstall and the issue hasn’t come back.

5 Likes

Thanks. This helped.

All good.

One thing to add. About a week later the issue re-occurred. I have no idea why. I ended up having to do the same process again to fix. However the 2nd time around, once it was up and working properly I took the opportunity to do the uninstall process listed on HACS to clean it out entirely. I then did a complete reinstall of HACS from fresh. It seems far more stable from a complete reinstall and the issue hasn’t come back.

1 Like

I have a similar issue. After a restart to add a new input boolean in configuration.yaml, HACS stopped working out of the blue, and with it the custom components I had installed. Tried reinstall HACS, but it doesn’t help. No three dots, so can’t remove integration. Following the removal guide gets me nowhere. Got my hopes up when I saw Pernod’s guide, but it doesn’t help. I completely removed custom_components, and removed everything from .storage related to HACS, and restarted Hassio about a million times between each step, but HACS is still listed under Integrations, without three dots so I can’t remove it, reinstall it or reconfigure it.
EDIT: Unsure what made it work, but at last I got the three dots back after doing one more reinstall from bash. Then I could remove the integration, reinstall again and add the integration again. Hopefully it will stay installed now.

Glad you got it sorted. Removing all the files, rebooting a few times, then re-installing the files, seems to be the base of getting the 3 dots back. Very odd though. On the plus, having now totally uninstalled and reinstalled HACs (after getting the dots back) it’s been working perfectly for 3 weeks now, so that appears to be a long term fix.

The same Issue
I noticed in home-assistant.log folloving message:

2022-07-01 14:40:27 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration hacs which has not been tested by Home Assistant.
This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant. Despite deleting trough instruction above, still no success. :joy: :rofl:

2022-07-01 15:25:25 (4.88 MB/s) - written to stdout [2742/2742]

INFO: Trying to find the correct directory…
INFO: Found Home Assistant configuration directory at ‘/root/config’
INFO: Changing to the custom_components directory…
INFO: Downloading HACS
–2022-07-01 15:25:25-- https://github.com/hacs/integration/releases/latest/download/hacs.zip
Resolving github.com (github.com)… 140.82.121.3
Connecting to github.com (github.com)|140.82.121.3|:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://github.com/hacs/integration/releases/download/1.25.5/hacs.zip [following]
–2022-07-01 15:25:25-- https://github.com/hacs/integration/releases/download/1.25.5/hacs.zip
Reusing existing connection to github.com:443.
HTTP request sent, awaiting response… 302 Found
Location: https://objects.githubusercontent.com/github-production-release-asset-2e65be/172733314/ed890af9-6297-4b6e-aaa2-ab9c9520f582?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220701%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220701T132525Z&X-Amz-Expires=300&X-Amz-Signature=408a8dbec2228c13e97ef816fd0a6dd90570d1524550b506a97523081b8d1a56&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=172733314&response-content-disposition=attachment%3B%20filename%3Dhacs.zip&response-content-type=application%2Foctet-stream [following]
–2022-07-01 15:25:25-- https://objects.githubusercontent.com/github-production-release-asset-2e65be/172733314/ed890af9-6297-4b6e-aaa2-ab9c9520f582?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAIWNJYAX4CSVEH53A%2F20220701%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20220701T132525Z&X-Amz-Expires=300&X-Amz-Signature=408a8dbec2228c13e97ef816fd0a6dd90570d1524550b506a97523081b8d1a56&X-Amz-SignedHeaders=host&actor_id=0&key_id=0&repo_id=172733314&response-content-disposition=attachment%3B%20filename%3Dhacs.zip&response-content-type=application%2Foctet-stream
Resolving objects.githubusercontent.com (objects.githubusercontent.com)… 185.199.108.133, 185.199.111.133, 185.199.110.133, …
Connecting to objects.githubusercontent.com (objects.githubusercontent.com)|185.199.108.133|:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: 1990485 (1.9M) [application/octet-stream]
Saving to: ‘hacs.zip’

hacs.zip 100%[========================================================================================================>] 1.90M 9.11MB/s in 0.2s

2022-07-01 15:25:26 (9.11 MB/s) - ‘hacs.zip’ saved [1990485/1990485]

INFO: Creating HACS directory…
INFO: Unpacking HACS…
INFO: Removing HACS zip file…
INFO: Installation complete.

INFO: Remember to restart Home Assistant before you configure it
➜ ~ ha core restart
Processing… Done.
However, this Instalation is far from beeng perfect

It is impossible to work out what part of your post is logs and which is commentary, or wjat your point is.

Hey so, one reason why an integration cannot be uninstalled is if a newer version has been installed that tries to use to the older version config but fails to start with that config.

In that case, it cannot uninstall itself and you are stuck.

One thing I did is:

  1. rename the custom_components/integration directory to something different
  2. download the older version of the integration manually from github releases
  3. unpack in custom_components so that the old code is now accessible
  4. reboot HA
  5. delete the integration from HA
  6. remove the integration from HACS
  7. reboot HA

Well that solves that mystery most likely - thanks as I’d never worked out what caused my mess to start with.

Thankfully, I’ve not had it reoccur since my fix above, but it’s nice to know why.