A device for extracting gas from the upper part of a bag containing a powdered material, said device comprising: [a] cannulas comprising gas driving means, said cannulas having a distal end and a proximal end, said gas driving means being provided at least at said distal end, said cannulas being movable along a first direction for being inserted into the opening of a bag, and along a second direction, perpendicular to said first direction between: [i] a close cannula position, wherein said cannulas are close to one another, such that said cannulas can be introduced in the opening of said bag along said first direction, and [ii] a spaced cannula position, wherein said cannulas are spaced apart from one another such a distance that said bag can be held by said opening through said cannulas, and [b] first clamps movable between: [i] an open position of the first clamps, wherein said first clamps are spaced apart from one another, such that said opening of said bag is arranged between said first clamps, in the open state, and [ii] a closed position of the first clamps, wherein said first clamps are close to one another, such that said opening of said bag is pressed between said first clamps, characterized in that when said cannulas are in said spaced cannula position and said first clamps are in said closed position of the first clamps, said first clamps are movable along said first direction, in the direction of said proximal end towards said distal end, moving away from said proximal end, between: [i] an initial extraction position, [ii] a final extraction position, for extracting gas from said bag. [a] cannulas comprising gas driving means, said cannulas having a distal end and a proximal end, said gas driving means being provided at least at said distal end, said cannulas being movable along a first direction for being inserted into the opening of a bag, and along a second direction, perpendicular to said first direction between: [i] a close cannula position, wherein said cannulas are close to one another, such that said cannulas can be introduced in the opening of said bag along said first direction, and [ii] a spaced cannula position, wherein said cannulas are spaced apart from one another such a distance that said bag can be held by said opening through said cannulas, and [i] a close cannula position, wherein said cannulas are close to one another, such that said cannulas can be introduced in the opening of said bag along said first direction, and [ii] a spaced cannula position, wherein said cannulas are spaced apart from one another such a distance that said bag can be held by said opening through said cannulas, and [b] first clamps movable between: [i] an open position of the first clamps, wherein said first clamps are spaced apart from one another, such that said opening of said bag is arranged between said first clamps, in the open state, and [ii] a closed position of the first clamps, wherein said first clamps are close to one another, such that said opening of said bag is pressed between said first clamps, [i] an open position of the first clamps, wherein said first clamps are spaced apart from one another, such that said opening of said bag is arranged between said first clamps, in the open state, and [ii] a closed position of the first clamps, wherein said first clamps are close to one another, such that said opening of said bag is pressed between said first clamps, [i] an initial extraction position, [ii] a final extraction position, for extracting gas from said bag.