Cannot "demote" content host to library environment and default organization content view

Problem:

For testing I had a server assigned to a Dev environment in customized custom view. As the whole environment/content view concept isn’t really working for us I wanted to revert the server back to default, i.e. Library environment and the “Default Organization View” just like I have with other servers.

However, even though the host shows up with LIbrary and the correct content view the host doesn’t get the updates like the others. redhat.repo still shows a url to the dev/contentview. There are also no installabled updates shown for that host unlike other hosts, which have never changed from library and the default view.

I haven’t found a way how to make this work again. It seems once assigned to an environment or to a specific content view it’s not possible to get this back.

Expected outcome:

Host using library and default organization view.

Foreman and Proxy versions:

Foreman 1.17.1

Foreman and Proxy plugin versions:

Katello 3.6.0

Other relevant data:
[e.g. logs from Foreman and/or the Proxy, modified templates, commands issued, etc]

Is this working for everybody else?

I wonder if you are hitting: Bug #23837: Content View is not updated on Content Host when change is made via Hosts / All Hosts <Edit option> - Katello - Foreman

You could try re-registering the system with subscription-manager and register to the other environment.