How to remove(unregister) registered instance from Unity mapping?

I had the same problem and just removed the registrations of the ContainerControlledLifetimeManager from my Container:

foreach (var registration in container.Registrations
    .Where(p => p.RegisteredType == typeof(object)
                && p.Name == name
                && p.LifetimeManager.Type == typeof(ContainerControlledLifetimeManager)))
{
    registration.LifetimeManager.RemoveValue();
}

Leave a Comment