An apparatus for treating containers, including a transport device which transports the containers along a specified transport path, the transport device including a plurality of holding elements for holding the containers, with the holding elements being transported along the specified transport path. The apparatus includes a cleaning device for sterilizing the holding elements at least in sections.