Skip to content

Cannot remove orphaned GitHub repository #4994

@geoffbon

Description

@geoffbon

System Health details

System Information

version core-2025.12.3
installation_type Home Assistant OS
dev false
hassio true
docker true
container_arch amd64
user root
virtualenv false
python_version 3.13.9
os_name Linux
os_version 6.12.51-haos
arch x86_64
timezone America/New_York
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
HACS Data ok
GitHub API Calls Remaining 5000
Installed Version 2.0.5
Stage running
Available Repositories 2504
Downloaded Repositories 32
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Home Assistant Supervisor
host_os Home Assistant OS 16.3
update_channel stable
supervisor_version supervisor-2025.12.3
agent_version 1.7.2
docker_version 28.3.3
disk_total 78.0 GB
disk_used 54.5 GB
nameservers 10.0.0.2
healthy true
supported true
host_connectivity true
supervisor_connectivity true
ntp_synchronized true
virtualization kvm
board ova
supervisor_api ok
version_api ok
installed_addons Samba share (12.5.4), HassOS SSH port 22222 Configurator (0.9.3), File editor (5.8.0), TimescaleDB (5.4.2), ESPHome Device Builder (2025.12.0), Samba Backup (5.2.0), Piper (2.1.1), Whisper (3.0.1), Matter Server (8.1.1), Advanced SSH & Web Terminal (22.0.3), pgAdmin4 (4.0.0), Z-Wave JS UI (6.1.0), Studio Code Server (6.0.1), Grafana (12.1.0), Zigbee2MQTT (2.7.1-1), Mosquitto broker (6.5.2)
Dashboards
dashboards 4
resources 18
views 11
mode storage
Network Configuration
adapters lo (disabled), enp6s18 (enabled, default, auto), docker0 (disabled), hassio (disabled), veth743e8e5 (disabled), veth6ed4c78 (disabled), vethed45531 (disabled), veth6f69ba7 (disabled), veth267f5d0 (disabled), vethfa36be0 (disabled), vetha6a66ca (disabled), vetha271fc2 (disabled), vethb23e59e (disabled), veth5170f0d (disabled), vethdd95f88 (disabled), veth376fdc1 (disabled), veth4946399 (disabled), veth7f8b338 (disabled), vethcaf242e (disabled)
ipv4_addresses lo (127.0.0.1/8), enp6s18 (10.0.0.59/8), docker0 (172.30.232.1/23), hassio (172.30.32.1/23), veth743e8e5 (), veth6ed4c78 (), vethed45531 (), veth6f69ba7 (), veth267f5d0 (), vethfa36be0 (), vetha6a66ca (), vetha271fc2 (), vethb23e59e (), veth5170f0d (), vethdd95f88 (), veth376fdc1 (), veth4946399 (), veth7f8b338 (), vethcaf242e ()
ipv6_addresses lo (::1/128), enp6s18 (fe80::a32e:a077:a7ea:16d8/64), docker0 (fe80::b09a:c1ff:fe31:d726/64), hassio (fe80::9405:5bff:fe4f:54be/64), veth743e8e5 (fe80::9857:86ff:fe08:4efa/64), veth6ed4c78 (fe80::e02c:8bff:fe3e:6e08/64), vethed45531 (fe80::466:86ff:fe8a:4734/64), veth6f69ba7 (fe80::54ed:16ff:fe67:47c4/64), veth267f5d0 (fe80::7c4e:47ff:fe9e:f987/64), vethfa36be0 (fe80::c434:8dff:fe5a:bf7f/64), vetha6a66ca (fe80::7838:19ff:fe2f:7a08/64), vetha271fc2 (fe80::b8f6:50ff:fe98:4455/64), vethb23e59e (fe80::805b:12ff:fe94:eb8b/64), veth5170f0d (fe80::506f:10ff:fe9f:f817/64), vethdd95f88 (fe80::5c26:c5ff:fe47:905b/64), veth376fdc1 (fe80::4091:6eff:fe00:dc96/64), veth4946399 (fe80::804d:1bff:fef8:ec0c/64), veth7f8b338 (fe80::4447:3dff:fe7f:8246/64), vethcaf242e (fe80::54ef:5eff:feb8:a6a1/64)
announce_addresses 10.0.0.59, fe80::a32e:a077:a7ea:16d8
Recorder
oldest_recorder_run October 24, 2025 at 4:56 PM
current_recorder_run December 16, 2025 at 11:31 AM
estimated_db_size 8388.75 MiB
database_engine postgresql
database_version 17.6

Checklist

  • I'm running the newest version of HACS https://github.com/hacs/integration/releases/latest
  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • I have read https://hacs.xyz/docs/help/issues/
  • This issue is related to the backend (integration part) of HACS.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This is a bug and not a feature request.
  • This issue is not a duplicate issue of currently open or issues pending release.

Describe the issue

I have a theme installed that uses a repository that no longer exists (gives a 404 if you try to visit the URL).
If I try to remove it by going to HACS > overflow (⋮) menu > Remove, I get a confirmation dialog; clicking 'REMOVE' appears to do nothing and the dialog stays up.
For reference, the repo link is this.

This is all kicked off with a warning, which surfaces in the repair list:

2025-12-17 15:13:57.930 WARNING (MainThread) [custom_components.hacs] You have 'hekm77/reeder_dark_theme' installed with HACS this repository has been removed from HACS, please consider removing it. Removal reason (Repository has been deleted.)

At which point I try to remove it. After that, the relevant log sequence appears to be:

2025-12-17 15:15:53.490 DEBUG (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Getting repository information
2025-12-17 15:15:53.847 ERROR (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> GitHub returned 404 for https://api.github.com/repos/hekm77/reeder_dark_theme
2025-12-17 15:15:53.938 DEBUG (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Running checks against main
2025-12-17 15:15:53.939 INFO (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Removing
2025-12-17 15:15:53.940 ERROR (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Path /config/themes/ is blocked from removal
2025-12-17 15:15:53.940 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139957256497216] Error handling message: Unknown error (unknown_error) Geoff from 10.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 268, in hacs_repository_remove
    await repository.uninstall()
  File "/config/custom_components/hacs/repositories/base.py", line 762, in uninstall
    raise HacsException("Could not uninstall")
custom_components.hacs.exceptions.HacsException: Could not uninstall

Possibly related is #2478 which fixes issue #2470.

Reproduction steps

  1. Go to HACS
  2. In the overflow (⋮) menu next to a repo which no longer exists in GitHub (i.e. it 404s when opened), select Remove
  3. Confirmation dialog appears, click REMOVE
  4. Note that confirmation dialog is still present after operation appears to complete
  5. Note that repo is still present

Debug logs

2025-12-17 15:15:53.490 DEBUG (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Getting repository information
2025-12-17 15:15:53.847 ERROR (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> GitHub returned 404 for https://api.github.com/repos/hekm77/reeder_dark_theme
2025-12-17 15:15:53.938 DEBUG (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Running checks against main
2025-12-17 15:15:53.939 INFO (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Removing
2025-12-17 15:15:53.940 ERROR (MainThread) [custom_components.hacs] <Theme hekm77/reeder_dark_theme> Path /config/themes/ is blocked from removal
2025-12-17 15:15:53.940 ERROR (MainThread) [homeassistant.components.websocket_api.http.connection] [139957256497216] Error handling message: Unknown error (unknown_error) Geoff from 10.0.0.1 (Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36)
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/components/websocket_api/decorators.py", line 28, in _handle_async_response
    await func(hass, connection, msg)
  File "/config/custom_components/hacs/websocket/repository.py", line 268, in hacs_repository_remove
    await repository.uninstall()
  File "/config/custom_components/hacs/repositories/base.py", line 762, in uninstall
    raise HacsException("Could not uninstall")
custom_components.hacs.exceptions.HacsException: Could not uninstall

Diagnostics dump

config_entry-hacs-aeb2c99808593be603269df091c7ebc8.json

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue:backendFor issues with the backend/integration

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions