Minecraft wiki entry for Cactus, associated text: When the spot a cactus is placed in becomes unsuitable, such as when a solid block is placed next to it or its supporting block is removed, the cactus block uproots and drops as an item.