Deleting a Content Type in SharePoint


I'm trying to delete a content type from SharePoint, but it keeps giving me the message:
"The content type FOO BAR is part of an application feature."
I have deactivated the feature, retracted the solution and deleted the package from the solution store, the content type is not in use by any lists (I followed the method here), there are no errors in the logs.

I have also tried to do it through code, with the same result.
I tried following the advice to change it's settings so that "Update all content types inheriting from this type" is set to "NO", but it won't save/persist that change (no error, it just keeps reverting back to "YES").

How can I delete this content type?

Best Solution

I just ran into the same issue and the problem appears to be that although the solution was retracted and deleted, the feature was never uninstalled.

The resolution is to: 1. redeploy the offending solution. 2. activate and then deactivate the feature. 3. go through the steps uninstalling the feature and retracting and deleting the solution.

In pseudo code:

stsadm.exe -o deactivatefeature
stsadm.exe -o uninstallfeature -force
stsadm.exe -o retractsolution -immediate
(execute the jobs created from retracting the solution)
stsadm.exe -o execadmsvcjobs
stsadm.exe -o deletesolution