You could try this:
class remove_unmanaged {
# always test with noop first!
resources { 'host':
purge => true,
noop => true,
}
# remove ALL unmanaged host resources
resources { 'host': purge => true }
}
This would ensure that all unmanaged entries are removed.