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