iterate package versions; remove extraneous middleware/libraries