Remove the cabinet doors from their frames and place them on a drop cloth. Remove the door hardware with a power drill or screwdriver and set them aside.
Use an orbital sander equipped with 120-grit sandpaper to smooth out the surface of the doors. Pay special attention to areas where screws and nails were removed since the wood will be slightly elevated or even splintered and will need to be smoothed.
Gather the sawdust from the sanded cabinets. Mix a small amount of wood glue in a bowl with the sawdust. Continue to add the sawdust until the wood glue forms a thick paste.
Apply the paste to the holes on the doors with a putty knife. Press the paste into the holes to fill them completely. Angle the putty knife slightly to scrape away any excess glue surrounding the hole. Allow the paste to dry for several hours until it's hard to the touch.
Use 120-grit sandpaper to smooth out the paste until it is flush with the door’s surface.
Wipe the doors clean with a damp washcloth and paint or prime as usual.