Put food in tightly sealed containers.
Food should always be kept in sealed, airtight containers because they deter the majority of common household pests. By limiting access to food supplies, you may prevent ants from getting in and keep out any other pests that might be searching for a food source at the same time.
Keep your home and its surroundings clean.
What one item is essential to every living organism? Naturally, food! While it’s true that you and your family must eat, there is no need to leave behind traces of your meals about the house, as ants are specifically attracted to such things. The most important thing you can do to keep your house clean and to ensure that food products are cleaned up and stored in sealed containers is to keep it free of clutter.