If you use a temporary sealant, like poster tack, only do so until you can fill the space with a more permanent solution. A weaker material will deteriorate over time, and the gap will open up again.

An additional benefit of sealing off your home: more effective temperature control, and thus lower energy bills. Plus, this is one of the least risky methods where kids or pets are concerned.

Diatomaceous earth is a fine powder that kills ants by pulling all the moisture from their bodies. It works by absorbing moisture from the ant itself, but it’s best used in dry environments. You also don’t want anyone in the house (especially pets and children) sniffing it up. Try using salt. It has a similar drying-out effect on ants, especially if they carry it back to their nests. You can spread it under doors, near windows, and along the edges of your walls. [1] X Research source

Many sources recommend using normal chalk; however, this is made of gypsum, not talc. This misconception could be the result of confusion with “ant chalk”, which is an insecticide that looks just like normal chalk. It was outlawed in the US in the 1990s, but you may still be able to find it in certain underground markets. Some baby powder brands are made of corn starch, so they will not work effectively against ants. Check the ingredients before you build your barrier.

Be careful where you place your deterrents: keep peppers and spicy things away from curious pets and children.

Spray the trail with an all-purpose cleaner or a bleach solution, then wipe it up with a wet paper towel. Spraying the nest can be effective, but you want to make sure that you get them all. If you only kill part of the colony, you may simply encourage some species of ant to establish new colonies – which ultimately won’t stop ants from coming into your home. For a less hands-on solution, vacuum them all up. Then, vacuum some talcum powder or diatomaceous earth to finish off the ants inside the vacuum cleaner. This second step is important: make sure that the ants don’t survive their trip into the vacuum! In a pinch, just use your hands or a damp towel. Squish the ants or wipe them into oblivion. You don’t need any fancy methods to eliminate the scouts.

Repeat this process as needed. You might need to do it many times to rid your home of all the ants.

Consider hiring an exterminator. If the trail of ant-workers disappears into the wall of your kitchen, you’ll find it much more difficult to trace. An exterminator can do this for you. [4] X Research source

Wipe down all surfaces. Spray tables and countertops with a mild bleach or vinegar solution. Make sure you keep up with a regular cleaning regimen: sweep, mop, and vacuum for at least a few days each week. If you do accidentally leave something out, take the opportunity to trace the trail of ants back to their source. It can be tempting to wipe out a swarm immediately – but try to think long-term about the problem.

Consider buying Tupperware or another brand of standardized, sealed containers. It may be easier to keep track of your containers (lids and bottoms) if you’re using a uniform set. Consider washing out resealable containers, then reusing them to store food. This might be a resealable yogurt tub, or a plastic takeout box, or even a lightly-used Ziploc bag.

Place pet-food bowls in a slightly larger bowl, then add some water to the larger bowl. This creates a moat around the pet food that the ants can’t easily cross.

Mix 1 cup water, 2 cups sugar, and 2 tablespoons boric acid. Mix 3 cups of water, 1 cup of sugar, and 4 teaspoons of boric acid.

Be careful not to place the bait directly on top of the ant trail. You’ll confuse them and interrupt their march home, making your baiting strategy less effective.