Not much of problems with ants, but I've had issues with pantry moths in the kitchen. No matter how far sealed some food is, even if unopened, I've managed to stumble upon a moth in it, questioning if it's sufficient just to get rid of it and still use the food regardless, really not a fan of throwing away food.
One option that was sort of sufficiently effective was to move most of food in glass jars with metal lid to keep it mostly isolated. The only flaw is that the metal lid can get rusty after trying to clean it few times.
The second option was using fly traps in pantry, but it's more effective to trap my fingers (takes forever to clean the residue) and the floor instead of staying still on the pantry wall (it falls occasionally and sticks on whenever it drops).
It gets worse when you see them enter the pantry and then you have to dig the whole area to search and destroy them.