Containers managed by gears won't have prefixes - this will remove any failed containers on the system, not just geard managed ones.

Would also recommend that only containers stopped older than a certain threshold should be checked.