Let's start with some engine theory. The EGR exists primarily to reduce NoX emissions by recirculating exhaust back into the intake system, where it displaces oxygen, one of the key components of combustion (thereby lowering the peak temps which prevents nitrogen and oxygen from combining). There are also a few other benefits that come from EGR usage; preventing burnt exhaust valves through lowering combustion chamber temps being a major one and a debatable increase in fuel economy being a minor one. The theory of increased fuel economy is due to the ECM expecting a specific amount of EGR flow and reducing the amount of fuel injected based on assumed flow due to a lessened presence of oxygen, which requires less fuel to retain stoichiometry. The ECM will also advance spark due to there being less combustible elements available, which requires more time to complete the burn in the combustion chamber, rather than in the exhaust. One of the reasons we clean the EGR is so that the amount of recirculated exhaust is kept close to the amount that the ECM expects, since the only way it can adjust is based on the O2 sensor, which reads exhaust oxygen content AFTER combustion has happened. This means you could run too lean or rich beforehand and potentially waste fuel or experience lean misfires/detonation.
Now that you should have a decent grasp on why the EGR exists and what it does, let's get to testing and cleaning it. This article is for digital EGRs, specificaly for the 3 tower setups commonly found on 60V6 motors from the late 80s to 1995. I know there were some 4 cylinders that used a 2 tower setup and most of this will apply to them as well.
The easiest way to test the EGR is if you have a scan tool or computer capable of commanding the EGR solenoids on from communicating with the ECM through the ALDL port. Now, not everyone has one of these, so I will describe a few manual methods. The most non-destructive and most repeatable method involves chopping an EGR connector off of another engine harness and using it as a test lead. Give yourself a good 6-8" of wiring to play with and then go grab a multimeter and determine which wires correspond to which solenoids.

As you can see, there is only 1 positive connection here, the other three are grounds. I would list wire colors but it seems GM changed them quite often. So, now would be a good time to label which wires do what. I used bands of electrical tape to quickly determine which was which, with 1 band being solenoid 1, 3 bands being solenoid 3 and none being the positive wire. Simple enough, right? Well, now that we have everything labeled, we're getting ready to test it so go pop the hood.
The EGR connector on a 3.1 isn't extremely easy to remove, but a flat-bladed screwdriver works great to push up on the little retaining clip near the positive pin. A 3100 is massively easier since it's not tilted toward the firewall. Once you get the connector off, just stick on your test lead and grab a pair of jumper wires. Connect one to the positive on the connector and either an exposed positive terminal in the engine bay or use a portable jumper (I like this method) and connect to it's positive cable. Just keep the positive wire away from any grounds (wrap it in something rubber if you feel the need) and you're done messing with it until you start removing the test lead.
Now, connect the end of a jumper wire to your ground and have the other end in your hand ready to connect to the solenoid grounds. If you are using a jump box, turn it on and start touching the solenoid ground wires. You should hear differing levels of noise from each solenoid, with the largest making the most noise. But even with differing levels of noise, you should hear an undeniable thump each time you complete the circuit. If not, the solenoid may be shorted internally or just REALLY stuck open/shut by carbon buildup.
Got an idea of which solenoids are definitely moving? Good, let's start the engine now after making sure none of the temporary wiring is going to get caught in the drive belt or burnt/melted by exhaust. Now, you shouldn't have any of the solenoids open when you start the engine or else you could have some difficulty, especially with solenoid 3. Once it's running, we're going to try and open the solenoids with the engine running to see if there are any restrictions between the exhaust stovepipe entrance and the EGR port on the intake manifold.
Start with solenoid 1 after the engine has a steady idle and preferably in closed loop. Connect it for a quarter of a second and break the connection. You should have noticed at least a small change in the engine speed. Now do it for half a second and then a full second. If you don't notice any change with a full second something is definitely plugged somewhere. Just to be sure, connect it again for a full 5 seconds. If you get no change at all, your solenoid is either stuck open or stuck shut. Stuck open should make for a rather rough idle.
Move on to solenoid 2. This one should ALMOST kill the engine when it's opened for any amount of time above a quarter second. After a few seconds of rough idling, the IAC should have opened far enough to offset some of the roughness if the engine didn't stall before then. Solenoid 3 is almost guaranteed to stall the motor if connected for more than a quarter of a second without any kind of added throttle. If it doesn't, your motor either idles higher than most, or has a very fast reacting IAC valve. You can shut the motor off now after testing the solenoids enough to your liking. If one solenoid didn't effect the engine but the rest did, that solenoid needs to be looked at. If none effected anything, it's likely there is a blockage in either the EGR port of the intake or the stovepipe has some blockage since EGR solenoids don't tend to all fail at the same time.
If they all reacted as expected, good. You don't necessarily have to pull it off and clean out the carbon that has accumulated in the path that recirculated exhaust takes. If ANY of the solenoids acted differently than they should have, you need to either pull the EGR off and inspect/clean it or have it disabled in the ECM. You really don't want the ECM to lean out and add spark every time it commands the EGR on and EGR doesn't flow as expected, as that's just asking for trouble.
Pulling off the EGR on a 3.1 is fairly straightforward, you'll just need a 10mm socket and ratchet for the EGR itself and a 13mm for the EGR to intake adapter. Since it's incredibly straightforward to remove, I'll just skip explaining it. If you REALLY need the room behind the motor, on a W-body you can disconnect the dog-bone mounts and put the transmission in neutral to rock the engine forward. The checking/changing spark plug article is a good reference for this procedure.
Now that the EGR is off, take a look at the bottom side of it and you should see a bunch of carbon in a U shape (which is roughly what the inside of the gasket looks like), with 3 holes - 1 at each edge and one at the apex of the U. It should be obvious which solenoid is the smallest and largest by looking at the orifice size. Now, to scrape all of the carbon off, I like using a fat flat bladed screwdriver, that way I don't gouge the surface too much. Any extremely difficult deposits could use a little bit of ATF or carb cleaner to loosen it up. With the surface done, take a look at the orifices. I got lucky and have enough screwdrivers to essentially dig out the carbon in all of it without much trouble. The phillips head screwdrivers also work nicely since they have 4 contact patches that don't tend to get caught on burrs. Just stick it in the hole and twist until flaky black stuff quits flying out.
Once that's done, let's look at the central hole. That's where the exhaust comes in (sort of like a plenum) and sits before the valves open and gets shot into the intake. The exhaust back-pressure actually pushes against the valves so they should stay closed until commanded open unlike previous EGR styles which relied on manifold vacuum to hold them shut. The valves also rotate slightly when they open and close, which helps against grits of carbon holding them open slightly. Because of this, you can expect either large chunks or a solid layer of carbon to just exist there. If it is there, it needs to be removed, which means shaking it out or using a tool to break it into smaller pieces before shaking it out.
Now let's get back to the valves themselves. If you had any that you suspect are stuck open or shut, now is the time to test it. If they're stuck shut, then get a screwdriver the correct size and insert it into the hole of the suspected solenoid and push on it. It should travel about ¼" before it stops moving and should retract automatically and instantly when you remove pressure. If it does this, then the valve obviously isn't stuck. If you suspect it's stuck open, you should be able to visually determine that the valve isn't seated. To make sure, push against it with the proper screwdriver. If it moves, it may not be stuck or may be limited in movement. You will have to determine this. The solenoid 1 from my wife's Grand Prix 3.1 was stuck shut for the longest time. I figured the solenoid was dead, but no. After messing with the valve enough, it opened and got stuck open. It took roughly 5 minutes to return to a seated position without any assistance. At this point I dumped a small amount of ATF into the orifice and opened and closed the valve manually by either pushing on the flat surface of the valve to open or pushing against the spring above it to close it. After a few minutes it moved freely. I then hooked up the test lead with it off the vehicle and it opened fully with power applied and closed fully with no power applied.
The EGR should now be all clean, and the solenoids working after testing them off car using the same method, or have a new EGR to replace the junk one or a block-off plate if you are deleting it in the ECM. Now we get to go deal with the other part of this project, the EGR adapter.
The adapter is fairly straightforward, it connects the stovepipe and intake by means of the EGR. You should try and get whatever carbon is in the stovepipe out now since, if you've gone through all of this trouble to make sure it's working, you might as well get the source of the exhaust as well. A wire coat hanger should be able to bust through deposits easily without damaging the pipe itself. Once you're done fishing it around like a roto-rooter that part is done. Now we move to the adapter. There is probably a significant amount of carbon stuck in the U shaped channel, so get a screwdriver of the appropriate size and dig it all out. Since you can't really tip it, you'll have to blow it out (with a compressor or your own way of generating airflow). Assuming you ran the screwdriver around the stovepipe exit a few times, now the adapter is done.
Time to get to the intake. I had a pinky width and almost length chunk of carbon stuck in there... it was a challenge to pull out without breaking, but it is possible. If it breaks, you should be able to pull the intake tubing off and open up the TB with one hand and pull the chunk out with a curved tool (like a seal puller). This will prevent it from getting ingested into the engine and causing problems, like bouncing against the intake valves, not exiting the combustion chamber, or getting trapped at the cat screen, all of which are likely to cause noise but not damage, since the carbon is usually fairly loose packed and breaks apart with just slightly more than the pressure of a pinch.
Now that intake port should be cleared of large carbon chunks, you should take some kind of brush (preferably brass since it shouldn't damage aluminum) and basically polish the port so that the carbon has a harder time sticking to it in the future. When that's done, the disassembly and cleaning process is done, so it's time to put it back together.
Assembly is more or less the reverse of disassembly but you should thread the long 10mm bolt on it's own before attempting to tighten the 13mm nuts so that the gasket doesn't interfere later. once it's threaded, tighen the nuts, remove the bolt, slap the solenoids on and tighten to spec.
On the 3.1, the torque specs for the adapter nuts is 20ft-lb and the EGR bolts are a little different; you tighten both finger tight, then tighten the long bolt to 11 ft-lb, then repeat with the short bolt. Then tighten the long bolt to 22ft-lb, and repeat with the short bolt. Now hook up your test leads and start the engine. If you have a vacuum or exhaust leak, it should be very obvious, and obviously you'll have to disassemble and fix the situation. If not, then when the engine has a stable idle, go through the testing again. All solenoids should now work as described. I never changed any gasket during this process since they looked decent, but if you have the cash, you might as well, it's cheap insurance.