Recording head of a printer is sealed by a cap connected with a gear pump. Fluid is discharged from a nozzle through the cap by a negative pressure being generated by the gear pump. The gear pump is driven at a first rotational speed to suck the fluid in the cap and to discharge the fluid from the nozzle. Subsequently, the gear pump is driven at a second rotational speed lower than the first rotational speed and then it is stopped. This prevents backflow of the fluid to a liquid ejection head and breakage of a liquid meniscus in the nozzle of the liquid ejection head occurring when cleaning of the liquid ejection head is ended.