Libya is spending about a billion dollars to buy 25 warplanes from Russia. This will include four Su-30 fighters, six Yak-130 trainers and 15 Su-35 fighter bombers (similar to the U.S. F-15E.) Libya is eager to replace its elderly fleet of 200 or so Russian MiG-21s, MiG-23s, Su-22s, Su-24s and a two dozen equally elderly Western warplanes. Libya will be buying fewer warplanes this time, because the existing fleet is largely in storage because of a pilot shortage. Not only that, but these older aircraft were bought on generous financial terms, and Libya has never paid for many of them. This angered Russia, especially after the Soviet Union dissolved in 1991.
So Russia decided to make the best of a bad situation, and offer Libya a sweet arms procurement deal that involves the forgiveness of these old debts. Libya initially wanted to buy several billion dollars worth of anti-aircraft missile systems, warplanes and tanks. The key to this happening was Russia forgiving $4.5 billion worth of debt from the last round of Libyan arms buys over two decades ago.
Russia was willing to forgive these old Soviet era arms debts, as long as it led to a new purchase (preferably for cash). Russia is not trying too hard to collect these old debts, for several reasons. First, some of these old Soviet arms sales were, for all practical purposes, giveaways. But it was more politically acceptable if the Soviets pretended to charge for the weapons, than admit they were making gift of the implements-of-destruction in order to pursue some diplomatic or political agenda.
Then there was the problem with how the weapons were used. Most often, the stuff was mainly employed to keep the locals in line, and slaughter them if they did not behave. Cries of "blood money" begin to be heard in the distance. When used against neighbors, the Soviet weapons often proved to be ineffective, or at least much less lethal than advertised. The Russians are not keen to revisit this subject.
Finally, there's the issue of exactly what the weapons were worth. The sales were often denominated in Soviet era rubles. This currency could not be freely traded, and its value, in relation to the dollar (about $1.60 per ruble), was set by the Russian government. The ruble could be traded on the black market, and it was worth far less than $1.60. Still is. Anyway, trying to collect these old Soviet debts would run into any number of embarrassing, not to mention legally untenable, issues. So the Russians have settled on using the old debts as bait to try and attract new sales. That works, at least it works better than those old Soviet weapons did.