A k-out-of-n system is a system with n independent components such that the system operates if and only if at least k of these n components operate successfully. A general age replacement of a k-out-of-n system is introduced which incorporates minimal repair, planned and unplanned replacements, and general random repair costs. The long-run expected cost rate is obtained. The aim of the paper is to find the optimal age replacement time T which minimizes the long-run expected cost per unit time of the policy. Various special cases are considered.