Described are a method and a system for cleaning a machine (1) for making liquid and/or semi-liquid food products for the ice cream, pastry or catering trade, wherein the machine (1) is fed with a capsule (17) containing a preparation for cleaning the machine (1), after which a cycle for cleaning the machine (1) is started.