The article deals with the problem of secondary financial insolvency. The problem of mutual debt minimisation is formulated as a maximum flow problem in the debt digraph. The article considers a problem of controlled revitalization of the firms, too.