Context. Solar observations suggest that some of the most dynamic active regions are associated with complex photospheric magnetic configurations such as quadrupolar regions, and especially ones having a δ-spot configuration and a strong Polarity Inversion Line (PIL). Aims. We study the formation and eruption of magnetic flux ropes in quadrupolar regions. Methods. We perform 3D MHD simulations of the partial emergence of a highly twisted flux tube from the solar interior into a non-magnetized stratified atmosphere. We introduce a density deficit at two places along the length of the subphotospheric flux tube to emerge two Ω-shaped loops, forming a quadrupolar region. Results. At the photosphere, the emerging flux forms two initially separated bipoles, that later come in contact creating a δ-spot central region. Above the two bipoles, two magnetic lobes expand and interact through a series of current sheets at the interface between them. Two recurrent confined eruptions are produced. In both cases, reconnection between sheared low-lying field lines forms a flux rope. Reconnection between the two lobes higher in the atmosphere forms field lines that retract down and push against the flux rope, creating a current sheet between them. It also forms field lines that create a third magnetic lobe between the two emerged ones, that later acts as a strapping field. The flux rope eruptions are triggered when the reconnection between the flux ropes and the field above them becomes efficient enough to remove the tension of the overlying field. These reconnection events occur internally in the quadrupolar system, as the atmosphere is non-magnetized. The flux rope of the first, weaker, eruption almost fully reconnects with the overlying field. The flux rope of the second, more energetic, eruption is confined by the overlying strapping field. During the second eruption, the flux rope is enhanced in size, flux and twist, similar to confined-flare-to-flux-rope observations. Proxies of the emission reveal the two erupting filaments channels. A flare arcade is formed only in the second eruption due to the longer lasting and more efficient reconnection at the current sheet below the flux rope.