CuO6 octahedra usually show elongated distortion, leading to active dx2-y2 orbitals and planar exchange interactions, while compressed CuO6 octahedra with active d3z2-r2 orbitals and unidirectional exchange interactions are exceptionally rare. Here, we design and synthesize a new frustrated antiferromagnet CaCuFe2O5 through a high-pressure and high-temperature approach, in which robust compressed CuO6 octahedra are realized, separating the Fe2O5 sheets that comprise zigzag spin ladders. Magnetic susceptibility and specific heat measurements exhibit a long-range antiferromagnetic order below the Néel temperature of 165 K, which is further confirmed by neutron diffraction. Detailed magnetic refinement reveals a C-type spin structure, with its spin arrangement and orientation distinct from that of the isostructural CaFe3O5. By constructing a Heisenberg model, we find that this is due to the exchange redistribution between the CuO6 octahedra and Fe2O5 sheets, during which some of the exchange interactions are selectively annihilated due to the specific orientation of the Cu d3z2-r2 orbitals in the compressed CuO6 octahedra. Our results provide a unique example of robust compressed CuO6 octahedra and show that it can selectively annihilate some of the exchange interactions and completely modify the spin structure and magnetic frustration accordingly.