This paper presents a novel scheme for comprehensive planning of reliability-centered maintenance (RCM) in the electrical distribution system to minimize the costs of cable repair and maintenance. To this end, a new formulation is proposed by taking into account the maintenance costs for different cases, repairs, repair-caused load projects, and energy purchase or generation costs. To solve the given complex problem, one of the most powerful and newest particle intelligence techniques called GSO algorithm is employed. Simulations are carried out on a 30-bus test network. Moreover, three scenarios and ten cases are applied in the process of extracting results to analyze the impact of various items on parameters of the objective function.