You don't mention what car? Assuming your in a Trad this is totally normal, the rough running is the car breathing fuel rather than fumes from the carbon canister when the purge valve opens, it will clear. To reset the light (but the fault code stays in the ECU as a multiple misfire) you need to repeat drive cycles....memory says 5 cycles and don't worry about copying them exactly normal driving does it but it's something like....
Start and idle for 30 seconds
Drive to above 30 MPH
Idle for 30 seconds
Drive to above 50 MPH
Idle for 30 seconds
Switch off, wait 2 min and repeat above.
If the light is going out and coming back on there is still some fuel in the canister and it can take a day or two of stop start heat cycles to get the purge valve open enough to clear it out. I stripped mine out (2002 +8) when I had a car suffer this in the southern part of France, had I known it would self clear I would have avoided a filthy mess....I did it a year later in Germany, or rather a petrol station guy did when he washed the back of the car with fuel! and I left it to self clear that time and it took a couple of days but all was fine. Never happened again in a further 6 years ownership.