The MiG-29 has indeed been out of production for a number of years. As a matter of fact, the RuAF's restructuring plan (well, one of their many restructuring plans) calls for the complete elimination of the -29 from RuAF stock. The Su-27s on the other hand are to be heavily modernized. As said above, there are plenty of used Fulcrums to go around, so most marketing efforts concentrate on either the upgrade of existing airframes or sale of as-is examples to those less discriminating customers.
The Fulcrum has always been plagued by two fundamental problems: its short range and its very mission-specific avionics suite. The comparison with the F-16 and F/A-18 did it little good, as it is an altogether different concept, that can't compete with the aforementioned American fighters in terms of multi-mission versatility. Worse yet, no one has ever had the chance (or desire) to use the airframe 'properly' in combat.
The Su-27 is clearly a superior airplane, but that comes at the price of having a much larger airframe, and much more sophisticated/complicated systems, the latter being the reason why it took so long for the Flanker to finally enter full operational service with the former Red Airforce. This superiority over the Fulcrum was made official when the two squared off in combat, the -27 came out on top, shooting down 5-7 Fulcrums at no Flankers lost. All in WVR (knife-) fights too.
Pacifism only works if EVERYBODY practices it