Did those people just go home, or their birth countries?
I'll limit my response to my sphere of competence here, nuclear security, and will pass over the question as it concerns espionage or intelligence personnel.
In 1991, following the dissolution of the Soviet Union, 15 newly-independent states emerged into a social landscape characterized by confusion and chaos on all fronts, from financial and economic conundrums to novel legal and political questions. Amidst this confusion, one of the priorities of Russian leaders and their counterparts in the remaining former Soviet Republics, was nuclear security.
As the Soviet state imploded, more than 38,000 nuclear weapons and about 1.5 million kilograms of plutonium and highly enriched uranium remained at thousands of sites across a vast Eurasian landmass that stretched across eleven time zones.
So, how was this clear gap in global nuclear security resolved?
The U.S. government is ironically responsible for brokering, negotiating and financing much of the Soviet arsenal's repatriation to Russia or dismantling elsewhere. Initiatives like the Cooperative Threat Reduction Program and the Nunn-Lugar amendments to the annual Defense Appropriations Bill (allowing the Secretary of Defense to spend $400 million, helping Russia to secure and eliminate former Soviet nuclear weapons) and later, the 2000 Plutonium Management and Disposition Agreement, all provided the framework for international cooperation around this subject.
The main sites were located in Belarus, Kazakhstan and Ukraine, which had the largest stockpile of nuclear arms outside of Russia. And while President Nursultan Nazarbayev handed over the Kazakh-owned assets at Semipalatinsk without issue, and Belarus signed a treaty on the withdrawal of its arsenal in 1994, Ukraine presented a challenge and its leaders were reluctant to abjure their claims to the nuclear weapons on their territory.
Leonid Kravchuck in Ukraine was faced with an American ultimatum: Unless Ukraine voluntarily surrendered and repatriated its warheads, it would face sanctions, blockades and it would no longer be recognized as a legitimate government by the international community. Naturally, under such pressure, they relented.
In retrospect, the dissolution of the Soviet Union has totally transformed the threat of nuclear weapons. Whereas the danger used to be mutual annihilation, nuclear security is more commonly today viewed through the lens of lost, stolen or 'orphaned' radioactive sources and the subsequent possibility of nuclear terrorism or large-scale accidental exposure.
More can always be said, but you might be interested in a few answers I wrote to parts of this question, namely: an answer that talks about what happened to the Soviet military, police and KGB, an answer about Soviet courts, and an answer about what happened to Soviet prisons and prisoners. Here is some further information on the overall fate of the Soviet military. It's worth noting that the Soviet military structure was more or less the last Soviet institution to collapse, and it carried on at least on paper as the Commonwealth of Independent States armed forces until June 1993.