Remove gems that aren't needed.