An optimal replacement policy for a deteriorating production system is considered. A minimal repair model is defined which assumes the system to be replaced after a specified time, during which a number of failures may occur The probability of failure can be given any arbitrary (increasing) form. The model is based on a technique which permits to deal with large repair times (non-negligible with respect to the replacement time and the interval time) and to calculate the probability of k breakdowns over the replacement interval rigorously. The average downtime relevant to k minimal repairs is obtained, on the contrary, from a semiempirical formula that appears in good agreement with the results of Monte Carlo simulations. The theory permits an accurate analysis of the error that is introduced when move conventional and approximate models are used.