To clean the recording head, the printer seals the nozzles with a cap member, thus forming a closed circulation system. In this state, the gear pump is activated to suck waste liquid and air from the cover member. Then, waste ink and air are introduced into the first ink tank by sequentially flowing in the cap member, the check valve, the tube, the gear pump, and a different tube. Air is introduced into the second ink tank as pressurized air through a corresponding tube. A check valve prevents waste ink and pressurized air from returning to the cover assembly. This suppresses backflow of liquid and air, and ink ejection is efficiently performed.