After you aerate, power rake your lawn to help break up the bumps. Then sow grass seed over the entire lawn (bluegrass in sun and fescue in shade) and water. Sometimes turfgrass thins out with age--it could be because of shade, insects or disease. Work on thickening up your lawn by reseeding thin areas and fertilizing annually. The earthworms or night crawlers that are leaving their castings (tiny balls of dirt) on the surface of your lawn are actually improving the soil structure of your lawn. Their activity improves air and water movement within the soil far better than machine aeration. With a thicker lawn, their piles won't be as obvious underfoot. There aren't pesticides or repellents for earthworms, and even if there were, it would be a mistake to drive them from your yard.