Apply boric acid. Safely kill centipedes that frequent rocky, damp areas with boric acid. Purchase this product from a home improvement store. Spray the chemical or sprinkle a powder form over rocks and wet areas around your yard.
Lay down glue traps to kill centipedes. Purchase glue or sticky insect traps from the home improvement store. Position these sticky strips around rocky landscaping. The glue traps the centipede, and the insect dies slowly.
Keep outside rocky areas dry. Centipedes require wetness or moisture to survive. Keep areas around your home and landscaping dry to kill any existing centipedes and prevent the invasion of new centipedes. Completely turn off water faucets and repair any leaking hoses or faucets.