How to Get Rid of Ants Inside (and Keep Them Out)

Quick Answer
To get rid of ants inside, wipe up the trail with soapy water, store sweets and pet food in closed containers, fix leaks, and seal the crack the ants use to get in. Then put slow-acting ant baits where the ants travel, preferably outdoors near the trail, and skip sprays. Workers carry bait back to the nest, so the whole colony, queens included, can die.
On this page
- How do you get rid of ants in the house, step by step?
- Why are ants coming inside, and which ant is it?
- Where do ants get in, and where should you look?
- Do ant baits work better than sprays?
- Are carpenter ants or flying ants a bigger problem?
- When should you call a pest professional?
- Frequently Asked Questions
- Our Take
- Sources
Key Takeaways
- A line of ants in the kitchen almost always leads to a nest outside and a small crack or gap the ants use as a doorway.
- Cleaning the trail, removing food and water, and sealing the entry point come first; they cost little and make baits work better.
- Slow-acting baits beat sprays because workers share the bait with the whole colony; sprays only kill the ants you can see.
- Expect fewer ants in about 5 to 10 days, and full control to take several weeks.
- Large black ants with sawdust-like piles, or winged ants indoors, can mean a nest inside the house, which is a job for a licensed professional.
How do you get rid of ants in the house, step by step?
The fastest lasting fix follows the ants home instead of fighting them on the counter. University of California IPM advises cleaning up trails right away, following them to find entry points and nests, sealing those openings, and using baits rather than spraying trails [1]. Here is the order that works:
- Watch before you wipe. Spend a minute following the line of ants in both directions. One end is the food or water they found; the other end is the crack, window frame or outlet where they enter.
- Clean the trail. Wipe or vacuum the ants and wash the path with soapy water or window cleaner. Ants lay down a scent trail that others follow, and washing it off breaks the chain.
- Take away the reward. Put sugar, cereal, honey and pet food in sealed containers, wipe up grease and sticky spills, take out the trash often, and fix dripping faucets.
- Seal the doorway. Caulk the crack or gap where the trail entered. UC IPM even suggests petroleum jelly as a quick plug for small openings [1].
- Bait the colony. If ants keep coming, place ant bait stations along their route, ideally outdoors near the trail and the foundation, and leave them alone while the ants feed.
Washing the scent trail and sealing the entry point cost almost nothing and stop most of the parade before any product is needed.
Why are ants coming inside, and which ant is it?
Most household ants nest outdoors and send workers inside looking for food, water or shelter, especially when the weather turns hot, dry or flooded [1]. Knowing the ant helps you choose the bait and decide whether you need help. These are the common indoor species UC IPM describes:
| Ant | Worker size | Color | Notes |
|---|---|---|---|
| Pharaoh ant | about 1/16 inch | yellow to honey or orange | tiny; often nests inside walls |
| Argentine ant | about 1/8 inch | dull brown | long trails, big colonies |
| Odorous house ant | about 1/8 inch | dark brown to shiny black | smells when crushed |
| Pavement ant | about 3/16 inch | dark brown to black | comes up from cracks in slabs |
| Carpenter ant | about 1/4 to 1/2 inch | black, or red and black | large; nests in damp wood |
Sizes and colors from UC IPM [1]. Penn State Extension describes odorous house ant workers as 2.4 to 3.3 mm long, all one size, brown to black, with a rotten smell when crushed; they mostly seek sweets and can get into pantry food [2].

If the ants you see have wings, look closely before you treat. Ants have a pinched waist, elbowed antennae and hind wings smaller than the front wings; termites have a thick waist, straight antennae and four wings of about equal size [1]. Our guide to what a termite looks like walks through the side-by-side check, and the bug identifier tool can narrow down other species.
Where do ants get in, and where should you look?
Ants follow edges, pipes and wires, so the entry point is usually close to where the trail disappears. In a kitchen, check the window frame over the sink, the gap where pipes pass through the wall under the sink, baseboards, outlets, the back of the counter and the door threshold. Pet bowls and the trash can are common targets, as are sticky jars in the pantry. Bathrooms draw ants to water, and potted plants can hide a whole nest.
Once you find the gap, seal it with caulk. Outside, trim plants that touch the siding, since branches and vines act as bridges. See our kitchen bug guide and bathroom bug guide for the other pests that use the same entry points.
Do ant baits work better than sprays?
Yes, for the colony. UC IPM calls baits "more effective and safer than sprays" because foraging workers carry the slow-acting bait back to the nest, where the entire colony, including queens, can be killed [1]. Sprays kill only the ants they touch, give temporary control, and spraying indoors will not stop more ants from entering. Barrier sprays can even trap ants inside.
A bait only works if the ants live long enough to carry it home, so never spray ants that are feeding on bait.
How to use ant baits well:
- Choose stations. Prepackaged or refillable bait stations are the easiest and safest option for home use, as long as they sit where children and pets cannot reach them [1].
- Put them where ants already walk. Outdoors, UC IPM suggests stations every 10 to 20 feet around the foundation and at nest openings; indoors, set them right beside the trail.
- Match the menu. Odorous house ants favor sweets, so Penn State recommends baits labeled for sweet-loving ants. Slow-acting ingredients such as hydramethylnon, fipronil or boric acid give workers time to share the bait with the queen and young [2]. If ants ignore a bait, move it or try a different type.
- Keep it stocked and wait. Replace empty baits. It can take 5 to 10 days to see fewer ants and several weeks or more for full control [1].
Read and follow the label. The label is the law. Use only EPA-registered products labeled for indoor or outdoor ant control as the label directs, keep every bait, spray and dust away from children and pets, and store products in their original containers. UC IPM also warns that outdoor pyrethroid sprays on hard surfaces such as driveways can wash into waterways.
Are carpenter ants or flying ants a bigger problem?
Sometimes. Carpenter ants are large: workers are shiny dark brown to black and about 1/4 to 1/2 inch long. They do not eat wood, but they hollow out nests in damp wood such as porch pillars, sills, joists and wall studs, often where a leak or poor ventilation keeps the wood wet. Signs include piles of coarse wood shavings mixed with insect parts near cracks and moldings. Penn State notes that foragers come out mostly at night and that ants return within days or weeks if the parent colony and its satellite nests survive [3].
Winged ants are a clue to where the nest is. Texas A&M AgriLife states that winged carpenter ants indoors generally mean a nest is inside the structure, and that they are most often noticed in late winter and early spring [4]. Odorous house ant swarmers appear from May through July in Penn State's region [2]. Timing varies by species and region.
For carpenter ants, fixing the moisture problem matters as much as any product. Repair leaks, replace soft or decayed wood, store firewood off the ground and away from the house, and keep branches off the roof. Unlike carpenter ants, termites eat wood and leave mud tubes; if you are not sure which you have, compare them in our termite identification guide and read how to get rid of termites.
When should you call a pest professional?
Most kitchen ant trails can be handled at home with cleaning, sealing and baits. Call a licensed pest professional when:
- Carpenter ants keep showing up, especially with wood shavings or winged ants indoors. Finding and treating nests inside wall voids is hard, and Penn State notes satellite colonies are unlikely to be fully eliminated without professional materials [3].
- Baits have not worked after several weeks and you have already sealed entry points and removed food and water.
- You find stinging ants indoors. UC IPM notes that most household ants rarely bite, but fire ants and harvester ants sting [1].
- Children, pets or health concerns make you unwilling to place baits yourself.
- You are not sure whether the winged insects are ants or termites. Termites need a professional inspection.
If you see winged insects coming out of a wall or floor and cannot tell ants from termites, get a professional inspection before you treat anything.
Ants are one of many pests that need a different plan; browse the full How to Get Rid Of guides or the pest library for more.
Frequently Asked Questions
How long does it take for ant bait to work?
UC IPM says it can take 5 to 10 days to see fewer ants, and full control may take several weeks or more [1]. Penn State gives two weeks or longer for odorous house ants. Keep baits stocked during that time.
Should I kill the ants that are eating the bait?
No. Those workers are carrying the bait back to feed the nest and the queen. Spraying or wiping them away near the bait stops that delivery, and UC IPM advises against using insecticide sprays while baits are in use [1].
Do flying ants in the house mean termites?
Not always. Both ants and termites swarm and both shed their wings. Ants have a pinched waist, elbowed antennae and smaller hind wings; termites have a thick waist, straight antennae and equal wings. Our termites vs flying ants guide shows the differences.
Our Take
We think most people fighting ants reach for the wrong tool first. A spray feels satisfying because the ants on the counter die, but by the extension guidance we relied on, that is exactly what keeps the colony alive and the trail coming back. The quiet approach wins: clean the trail, put food away, caulk the crack, and let slow-acting bait do the work outdoors where the ants enter. It takes patience, often a week or two. The one exception is large black ants with wood shavings or winged ants coming from inside walls. That points to a nest in the structure, and we would rather see a licensed professional find it than watch a homeowner drill into walls.
Sources
- Ants: Pest Notes for Home and Landscape. UC Statewide IPM Program, 2012.
- Odorous House Ant. Penn State Extension, 2014.
- Carpenter Ants. Penn State Extension, 2014.
- Carpenter Ants Around Homes. Texas A&M AgriLife Extension.
Pest activity and species vary by region. If you are unsure what you have, your local Cooperative Extension office can identify it. Always read and follow pesticide labels. Spotted an error? Tell us.





