A method for cleaning and/or maintaining the inner surface of a pipe, in particular the barrel of a gun, using a self-propelled maintaining device, comprising the following steps: a) a maintaining element of the, maintaining device is applied to the inner surface in a frictionally engaged manner such that it can be moved in an axial direction of the pipe while overcoming a friction force (F R), b) the following steps are carried out cyclically: I) a fixing element of the maintaining device is applied to the inner surface in a frictionally engaged manner such that it is fixed axially within the pipe with a fixing force (F F), the fixing force (F F) being chosen to be greater than the friction force (F R), II) the maintaining element is moved axially within the pipe relative to the fixing element in a desired maintaining direction by supporting on a fixing element while overcoming the friction force (F R), III) the fixing element is lifted from the inner surface so that it can be moved axially within the pipe while overcoming a displacement force (F v) less than the friction force (F R), IV) the fixing element is moved axially within the pipe relative to the maintaining element in a desired displacement direction by supporting on the maintaining element while overcoming the displacement force (F v). a) a maintaining element of the, maintaining device is applied to the inner surface in a frictionally engaged manner such that it can be moved in an axial direction of the pipe while overcoming a friction force (F R), b) the following steps are carried out cyclically: I) a fixing element of the maintaining device is applied to the inner surface in a frictionally engaged manner such that it is fixed axially within the pipe with a fixing force (F F), the fixing force (F F) being chosen to be greater than the friction force (F R), II) the maintaining element is moved axially within the pipe relative to the fixing element in a desired maintaining direction by supporting on a fixing element while overcoming the friction force (F R), III) the fixing element is lifted from the inner surface so that it can be moved axially within the pipe while overcoming a displacement force (F v) less than the friction force (F R), IV) the fixing element is moved axially within the pipe relative to the maintaining element in a desired displacement direction by supporting on the maintaining element while overcoming the displacement force (F v). I) a fixing element of the maintaining device is applied to the inner surface in a frictionally engaged manner such that it is fixed axially within the pipe with a fixing force (F F), the fixing force (F F) being chosen to be greater than the friction force (F R), II) the maintaining element is moved axially within the pipe relative to the fixing element in a desired maintaining direction by supporting on a fixing element while overcoming the friction force (F R), III) the fixing element is lifted from the inner surface so that it can be moved axially within the pipe while overcoming a displacement force (F v) less than the friction force (F R), IV) the fixing element is moved axially within the pipe relative to the maintaining element in a desired displacement direction by supporting on the maintaining element while overcoming the displacement force (F v).