Bug 870171 - Part 18: Add pruneEnvironments.