Can't Uninstall Waydroid - Failed to resolve typeattributeset statement

When trying to remove Waydroid, ostree-finalize-staged.service fails with this error:

systemd[1]: Finished ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
systemd[1]: Stopping ostree-finalize-staged.service - OSTree Finalize Staged Deployment...
ostree[53052]: Finalizing staged deployment
ostree[53052]: Copying /etc changes: 30 modified, 4 removed, 4724 added
ostree[53052]: Copying /etc changes: 30 modified, 4 removed, 4724 added
ostree[53052]: Refreshing SELinux policy
ostree[53061]: Failed to resolve typeattributeset statement at /etc/selinux/targeted/tmp/modules/300/my-waydroid/cil:2
ostree[53061]: Failed to resolve AST
ostree[53061]: semodule:  Failed!
ostree[53052]: Refreshed SELinux policy in 2101 ms
ostree[53052]: error: Finalizing deployment: Finalizing SELinux policy: Child process exited with code 1
systemd[1]: ostree-finalize-staged.service: Control process exited, code=exited, status=1/FAILURE
systemd[1]: ostree-finalize-staged.service: Failed with result 'exit-code'.
systemd[1]: Stopped ostree-finalize-staged.service - OSTree Finalize Staged Deployment.
systemd[1]: ostree-finalize-staged.service: Consumed 3.246s CPU time.

I can’t seem to find anything on how to fix this SELinux issue.

Any help would be greatly appreciated, thanks for reading!

I’ve just realised that it’s a module called my-waydroid, which suggests that it’s something I added.

I’ll remove it with semodule -r my-waydroid and see if that fixes it

Yep, removing that module allowed me to uninstall Waydroid