A method for cleaning the U-tube of the measurement cell of a densimeter, the measurement cell including an isothermic enclosure defining a measurement chamber closed by a stopper surrounded by a resilient seal, a U-tube extending inside the measurement chamber for containing a sample, the U-tube secured to the stopper at a base of the U-tube which includes free ends projecting outwardly from the measurement chamber to permit injection of the sample via an injection opening and evacuation of the sample via an evacuation opening, and means for causing the U-tube to vibrate. The method comprises, following a step of analyzing a sample, injecting a rinsing solvent into the injection opening of the U-tube, and subjecting the stopper to ultrasonic waves.