Liquid-infused surfaces are rough or patterned surfaces in which a lubricating fluid, such as oil, is infused, which exhibits various original properties (omniphobicity, biofouling, drag reduction). An outer flow in a confined geometry can entrain the oil trapped between the pattern of the surfaces by shearing the oil-water interface and cause the loss of the omniphobic properties of the interface. Starting from the theoretical analysis of Wexler et al. (Shear-driven failure of liquid-infused surfaces. Phys. Rev. Lett. 2015, 114, 168301), where a pure aqueous solution is the outer phase, we extend the predictions by introducing an extraction efficiency parameter α and by accounting for new dynamical effects induced by surfactants and aqueous foams. For surfactant solutions, decreasing the oil-water interfacial tension (γow) not only enhances oil extraction as expected but also modifies the dynamics of the receding oil-water interface through the variations of the receding contact angle (θ) with the capillary number (Ca), which is the ratio between the viscous and the capillary forces at the oil-water interface. For aqueous foams, the extraction dynamics are also influenced by the foam flow: oil is sheared by the thin film between the bubbles and the lubricating layer, which imposes a stronger interfacial shear compared to pure aqueous solutions. In both surfactant and foam cases, the experimental observations show the existence of nonuniform extraction dynamics related to the surfactant-induced instability of a two-fluid shear flow.