In this study, a preventive maintenance policy for a linear (or circular) consecutive [Formula: see text]-out-of-[Formula: see text]:[Formula: see text] system with independent and nonidentical distribution components is proposed. A set of all possible states of working system is used to calculate the system’s reliability. The primary objective of this study is to determine optimal replacement time for systems with nonidentical components. The costs for each component in the proposed optimal replacement policy are different.