A layered system of charges with logarithmic interaction parallel to the layers and random dipoles in each layer is studied via a variational method and an energy rationale. These methods reproduce the known phase diagram for a single layer where charges unbind by increasing either temperature or disorder, as well as a freezing first order transition within the ordered phase. Increasing interlayer coupling leads to successive transitions in which charge rods correlated in N Ͼ 1 neighboring layers are unbounded by weaker disorder. Increasing disorder leads to transitions between different N phases. The method is applied to flux lattices in layered superconductors in the limit of vanishing Josephson coupling. The unbinding charges are point defects in the flux lattice, i.e., vacancies or interstitials. We show that short range disorder generates random dipoles for these defects. We predict and accurately locate a disorder-induced defect-unbinding transition with loss of superconducting order, upon increase of disorder. While N = 1 charges dominate for most system parameters, we propose that in multilayer superconductors defect rods can be realized.