The XMs are always installed in an NCU or NEU enclosure. When you replace an XM, you must first remove these components and their power supply from the NCU/NEU.
If other base-frame components in the same NCU/NEU are to remain, you need to install a new enclosure for the XM replacement.
If the replaced XM and its power supply are the last remaining devices in the enclosure, you may want to consider removing the backplane and mounting the replacement devices in the cabinet. Retain the wire guide and add a terminal strip in place of the backplane to facilitate connections to the replacement devices.
Figure 1. XBN, XRE, XRL, XRM Point Multiplex Modules Footprint