Update apt cache if necessary.