The main point about removing crap from the mating surfaces on anything, is not to take off a layer of metal from one area or to leave deep (or any) scratches...if the gasket or sealant is soft then use a firm but non metallic scraper, OLD TOOTHBRUSH handle filed to a steep angle like a chisel is perfect, this will remove soft materiel, but be too soft to dig into the metal... if the gasket is hard then you will be tempted to use that pocket knife or scraper, but anything that can tilt or dig in MUST BE AVOIDED..if there are no protruding parts between the sides of the casing to be cleaned then an engineers rule ( solid steel ruler) can be laid across both sides and dragged along to scrape away the gasket or in stubborn cases held flat against the mating surface and used like a chisel to break up the gasket or crud, but by keeping the rule flat and using the 90 deg edge like a bulldozer to remove anything that stands up, don't be tempted to hold the scraper at an angle as this will dig in at some point and leave a depression that will leak in the future.. For those awkward windy edges with raised steel locators or oilways then even more care must be taken not to leave a damaged surface that will be hard to see or repair.. remove any lugs that can be removed, use a hard steel flat object that's long enough to have a good contact with the clean area so as not to twist or rotate as you push hard.. eg a screw driver blade might be easy to use but the flat area is only the flank or the tip...this will guaranteed dig in on one edge and leave a terrible groove in the softer metal of the casing. Better use a wood chisel with a new sharp edge and position it so that the flat back of the blade is on the mating surface and hold it flat as you push it into the gasket or gunge on the area to clean...Don't be tempted to flip it over and use the cutting ground edge against the metal as any slight change in angle of the handle will allow it to dig in.. Any hard object will want to dig in when the resistance increases if it is not flat to the surface, and held down flat hard. . That's why wood chisel's work so well, even wide ones can be used at a sideways angle to get round the wriggly bits...and i do mean a clean good chisel, not a rusty bent battered old thing from the junk box...
Don't sand off with emery or disks, you cannot guarantee to only remove the gasket or keep it flat..