Woodlice are often mistaken for pill bugs which they closely resemble. The difference between the two is that a pill bug, often referred to as a Roly Poly, can roll into a ball, while a woodlouse cannot. Woodlice are actually crustaceans and will appear anywhere that high levels of moisture are present. The most common places to find them are in gardens and flower beds. Unfortunately, they can also sometimes invade homes.
Walk around the exterior of the home and look for cracks and openings near the foundation of the home. Seal these well using caulk or expanding foam spray. This prevents any additional bugs from entering the home.
Purchase or rent a dehumidifier machine. Place the machine into an area of the home where the humidity is highest, or where you see the most woodlice appear.
Run the dehumidifier constantly for two to three days. This removes moisture from the air that the woodlice need to survive.
Turn off the humidifier and use a vacuum to suck up the dead woodlice that are left inside the home.
The appearance of woodlice inside the home is an indication that the home has moisture problems. Have the basement and foundation areas checked immediately for water seepage. Continuous use of a dehumidifier will keep the woodlice out of the home. However it's best to seal all cracks and crevices to prevent them from entering the house to begin with.