The answer to a centipede infestation is to take steps to eliminate their food source, moisture, and access points in your home. Centipedes are attracted to damp, dark areas and feed on other insects, so reducing these conditions can help get rid of them.
Start by sealing cracks and crevices around your home, fixing any leaks, and reducing clutter where centipedes can hide. You can also use diatomaceous earth or boric acid in problem areas. However, for a severe or recurring infestation, it's best to call a professional pest control technician who can properly identify the species and apply targeted treatments.