Adding script and updating pipeline to remove unused packages and remove code when no needed for azure image.