To get rid of a spider infestation, use a vacuum cleaner to remove webs, spiders, and egg sacs. Seal any cracks or crevices that can provide an entry point for spiders. Avoid leaving food out and keep outdoor lights off at night to reduce the number of insects that attract spiders. Place sticky traps in areas where spiders are likely to enter, and use insecticide sprays to kill spiders.