A method for extracting cartridges (1a;1b) of two different heights (ha;hb) in an extraction unit, such unit comprising a seat (11,12,13;15) for receiving any of said cartridges (1a;1b) for extraction thereof in the seat, the seat being delimited by a first part (11,12,13) and second part, the first part (11,12,13) having a first portion (11,12) and a second portion that are relatively movable to delimit a cavity, the first part (11,12,13) having a lock (112',132,132',142') for locking the first and second portions (11,12,13), wherein such unit further comprises a mechanical sensor for sensing the height (ha;hb) of a cartridge (1a;1b) and for controlling the lock (112',132,132',142'), wherein such method comprises: - receiving a cartridge (1a;1b) of said cartridges of two different heights (ha;hb) in the seat (11,12,13;15) when the first and second parts (11,12,13;15) are in a cartridge loading position and optionally ejection position; - relatively moving the first and second parts (11,12,13;15) to a cartridge extraction position; - arranging the first and second portions (11,12,13) to have the cartridge receiving cavity with a first depth (da) if the received cartridge has the first height (ha) or with a second depth (db) if the received cartridge has the second depth (db); the method being characterized by the following method steps: - sensing the height (ha;hb) of the received cartridge (1a;1b) with the mechanical sensor, - controlling the lock (112',132,132',142') with the mechanical sensor to lock or unlock the first and second portions (11,12,13) when the sensor is actuated by the received cartridge (1a,1b) of first height (ha) or of second height (hb); and - locking the first and second portions (11,12,13) when the delimited cavity has the first depth (da) or the second depth (db). the first part (11,12,13) having a lock (112',132,132',142') for locking the first and second portions (11,12,13), wherein such unit further comprises a mechanical sensor for sensing the height (ha;hb) of a cartridge (1a;1b) and for controlling the lock (112',132,132',142'), wherein such method comprises: - receiving a cartridge (1a;1b) of said cartridges of two different heights (ha;hb) in the seat (11,12,13;15) when the first and second parts (11,12,13;15) are in a cartridge loading position and optionally ejection position; - relatively moving the first and second parts (11,12,13;15) to a cartridge extraction position; - arranging the first and second portions (11,12,13) to have the cartridge receiving cavity with a first depth (da) if the received cartridge has the first height (ha) or with a second depth (db) if the received cartridge has the second depth (db); - receiving a cartridge (1a;1b) of said cartridges of two different heights (ha;hb) in the seat (11,12,13;15) when the first and second parts (11,12,13;15) are in a cartridge loading position and optionally ejection position; - relatively moving the first and second parts (11,12,13;15) to a cartridge extraction position; - arranging the first and second portions (11,12,13) to have the cartridge receiving cavity with a first depth (da) if the received cartridge has the first height (ha) or with a second depth (db) if the received cartridge has the second depth (db); the method being characterized by the following method steps: - sensing the height (ha;hb) of the received cartridge (1a;1b) with the mechanical sensor, - controlling the lock (112',132,132',142') with the mechanical sensor to lock or unlock the first and second portions (11,12,13) when the sensor is actuated by the received cartridge (1a,1b) of first height (ha) or of second height (hb); and - locking the first and second portions (11,12,13) when the delimited cavity has the first depth (da) or the second depth (db). - sensing the height (ha;hb) of the received cartridge (1a;1b) with the mechanical sensor, - controlling the lock (112',132,132',142') with the mechanical sensor to lock or unlock the first and second portions (11,12,13) when the sensor is actuated by the received cartridge (1a,1b) of first height (ha) or of second height (hb); and - locking the first and second portions (11,12,13) when the delimited cavity has the first depth (da) or the second depth (db).