A multipurpose machine for cultivating trees, comprising an inverted U-shaped structure that enables the machine to pass over existing trees or fruit trees to carry out pruning, disinfection or fruit picking tasks, provided at the bottom with wheels, driven by at least one motor that autonomously facilitates the movement thereof, characterised in that it comprises: - a first upper frame with a U-shape configuration, the core of which makes up one of the longitudinal sides of the machine, while the wings thereof shape up the front and rear sides of said structure, said wings being formed by tubes that are open at the free end and attached at points close to the ends thereof by a structural crossbar; - a second upper frame, with a U-shape configuration, facing that of the first frame, the core of which makes up the other longitudinal side of the machine, while its wings telescopically couple inside the wings of the first frame; - respective hydraulic cylinders the ends of which are mounted inside the respective facing wings (11, 21), with the driving of which moves the portion of the structure on the right is telescopically with respect to that on the left, varying the width of the machine; - respective vertical supports located in the vertices of the upper frames (1, 2) made up of a main tube in which a second telescopic tube couples in the lower end of which a wheel is mounted that is equipped with a drive motor and independent guide means for each wheel; - respective hydraulic cylinders the ends of which are mounted inside each of the vertical supports and the corresponding telescopic tube, in order to lift or lower the upper structure of the machine to adapt it to the height of the trees to be cultivated; - respective crossbeams that link the lower ends of the vertical supports by the two longitudinal sides of the machine, which make up structural and support means for the drive and control systems of the machine; - a cabin, mounted on one of the vertical supports, with the ability to rotate from a position in which it is located outside the structure of the machine to another in which it is placed in an area close to the central portion thereof. - a first upper frame with a U-shape configuration, the core of which makes up one of the longitudinal sides of the machine, while the wings thereof shape up the front and rear sides of said structure, said wings being formed by tubes that are open at the free end and attached at points close to the ends thereof by a structural crossbar; - a second upper frame, with a U-shape configuration, facing that of the first frame, the core of which makes up the other longitudinal side of the machine, while its wings telescopically couple inside the wings of the first frame; - respective hydraulic cylinders the ends of which are mounted inside the respective facing wings (11, 21), with the driving of which moves the portion of the structure on the right is telescopically with respect to that on the left, varying the width of the machine; - respective vertical supports located in the vertices of the upper frames (1, 2) made up of a main tube in which a second telescopic tube couples in the lower end of which a wheel is mounted that is equipped with a drive motor and independent guide means for each wheel; - respective hydraulic cylinders the ends of which are mounted inside each of the vertical supports and the corresponding telescopic tube, in order to lift or lower the upper structure of the machine to adapt it to the height of the trees to be cultivated; - respective crossbeams that link the lower ends of the vertical supports by the two longitudinal sides of the machine, which make up structural and support means for the drive and control systems of the machine; - a cabin, mounted on one of the vertical supports, with the ability to rotate from a position in which it is located outside the structure of the machine to another in which it is placed in an area close to the central portion thereof.