Topology optimization of trusses is one of the most inviting topics in the structural optimization field. In search for the computational efficiency, researchers have implemented many algorithms for this problem. With the advent of metaheuristic algorithms, structural optimization problems have become simpler to model; however, solution of these problems remains computationally expensive. The design candidates are generated by adding and removing the members heuristically and kinematically unstable candidates are mostly eliminated in metaheuristic truss topology optimization procedures. These procedures have a major flaw that needs to be overcome; metaheuristic algorithms may discard a promising but unstable design candidate although it can be repaired by adding and/or removing a few members. This study presents an algorithm to repair kinematically unstable planar truss design candidates. The algorithm first builds the connectivity matrix of the unstable candidates and identifies the structural components through geometric decomposition. Then, the repair takes place by adding and/or removing as less members as possible systematically in the conditions as absence of a basic truss and existence of unconnected or improperly connected components, supports, forces and/or remaining members. In addition, the presented algorithm gives information on how close is a candidate to a kinematically stable configuration. (C) 2020 Elsevier Ltd. All rights reserved.