The invention relates to a beverage preparation machine comprising an apparatus for frothing or heating milk, which apparatus is connected via a milk suction hose to a milk container, and a cleaning apparatus for cleaning the milk suction hose and the apparatus for frothing or heating milk by means of a flushing fluid. The milk can be sucked from the milk container into the apparatus for frothing or heating milk by means of a vacuum which can be generated in the apparatus for frothing or heating milk. The cleaning apparatus contains a switching valve which can be switched into an operating position in which a milk connection is enabled between the milk container and the apparatus for frothing or heating milk via the milk suction hose and into a flushing position in which a first flushing fluid connection is enabled between a flushing fluid outlet of the beverage preparation machine and the apparatus for frothing or heating milk via a flushing hose, the switching valve switched into the flushing position and the milk suction hose.