This paper presents the modelling and analysis of the M/G/1 machine repairman problem consisting of K working machines, Y spare machines and single repairman. Spare machines are considered to be either cold-standby, warm-standby or hot-standby. Using supplementary variable technique, an efficient recursive algorithm has been developed to obtain the distributions of the number of down machines at arbitrary, departure and pre-arrival epochs. The relations among the distributions at various epochs and some performance measures are also discussed. In addition, the waiting time analysis has been carried out. Finally, some numerical results have been presented.