The Soviet decision to pull out of Afghanistan was driven by political concerns, not fear of the Stinger or its efficacy. The war was unpopular domestically, it was unpopular within the Soviet military, it drew international ire, and it quickly grew to be a far lengthier and bloodier conflict than anticipated. All of this was true prior to the introduction of the Stinger, and the Stinger was, at most, an agitating factor.
The Stinger also was not required for the mujahideen to down Soviet aircraft, although it certainly helped. The Bear Went Over the Mountain (1996) details a 1985 assault in which 4 (out of 8) Mi-8 transport helicopters were downed by mujahideen anti-aircraft guns. Even after the introduction of the Stinger, mujahideen forces were able to take out helicopters without it. The portrayal of the Stinger as a game-changer might have occurred within the CIA (and certainly within the American media), but it wasn’t an accurate depiction of the situation on the ground.
The CIA sent 2,300 Stinger missiles to various mujahedin outfits throughout Afghanistan over the course of the war. Also it’s important to remember that US decision makers were risking a lot by implementing the Stingers in Afghanistan. First, the potential for those missiles to leave Afghanistan and be used on civilian or pro-US targets was large and second, the Stinger was US made which would give the Soviets concrete evidence of the US’s participation in arming the mujahideen. Evidently, the situation was so bad at the time that these huge risks had to be ignored and the Stingers were shipped to Pakistan for distribution in Afghanistan.
However the alleged performance of Stinger missiles in Afghanistan in the 1980s was grossly exaggerated:
“By comparing the number of Stingers provided to the Afghans with the number of aircraft downed, the impossibility of the accepted claims about effectiveness is shown. The success rate of the Stingers against all aircraft is calculated to have been, at best, in the 20% range. Even after the Stingers arrived in Afghanistan, the majority of aircraft continued to be downed by less sophisticated weapons, and the maximum total number of aircraft that may have been downed by Stingers is calculated as 150 over three years, with the actual number most likely less than that. A well documented chronology of events shows that the Stingers did not initiate, or increase the rate of, the decline in air attacks against the Afghan Resistance in the latter years of the war. Logical analysis refutes the idea that the relatively small military and economic costs that resulted from the Stingers had any significant influence on the course of the war, or on the Soviets’ decision to withdraw from Afghanistan which evidence indicates had been made before the deployment of the Stingers …” -Leonard Leshuk
The last Stingers were supplied in 1988 after increasing reports of fighters selling them to Iran and thawing relations with Moscow. After the 1989 Soviet withdrawal from Afghanistan, the U.S. attempted to buy back the Stinger missiles, with a $55 million program launched in 1990 to buy back around 300 missiles (US$183,300 each). The U.S. government collected most of the Stingers it had delivered, but by 1996 around 600 were unaccounted for and some found their way into Croatia, Iran, Sri Lanka, Qatar and North Korea.