prune: Added back --production support

fixes #4509

Test by @isaacs