Problems deleting old content views

I am running Foreman / Katello 3.4.1. And yes I know its an old version. And yes I know the problem I am having is fixed in newer versions but at this point I am not able to upgrade.

What I am seeing is this:

  • All my Composite Content View only have versions of Active views. Everything else has been removed.
  • Most of my Content Views will not let me delete older versions. In some of them I cannot delete the oldest versions but I can delete some of the newest versions. No rhyme or reason.

When I try to delete these content view versions I get an error saying the view is being used by a Composite View. However, that Composite view has long since been delete in the GUI.

Is there any way from the CLI to kill off the orphan content? I have already tried changing the timing and re-running the remove orphan content command. This does not seem to be doing anything.