To prevent pests you need to do three things. You have to get rid of food sources, water sources and living areas. One of the first steps is removing and cleaning up any food waste, standing water or clutter. You should also check the outside of your home to make sure you do not have anything that may be drawing pests to your home. Wood should be stacked of the ground and away from the house; garbage bins should be tightly closed; tree branches should not be touching the house.
You should also check for any cracks or openings o both the inside and outside walls of the house. The kitchen seems to be the biggest place for pests, so take extra steps in there. Clean up dirty dishes quickly; take garbage out promptly, do not keep recyclables in the house; wipe up spills and dry them; do not leave open food containers sitting around.