Pharaoh ants are a very small (2 mm) known to be a major nuisance pest in various buildings such as hospitals, apartments, hotels, and food establishments. They are found all around the world, and now you're trying to figure out how to get rid of pharaoh ants from your home.
Like most insect pests the best way to get rid of them is via prevention. Due to the overwhelming number of insects in a given population, it is extremely difficult to completely remove all ants from a colony. This particular nuisance is so small that they are able to gain entry to areas that most insects wouldn't be able to enter. Their choices of food are wide ranging and can eat anything from peanut butter and jelly to fruit juices or other dead insects. These little ants are known to gnaw into various materials like silk or rubber which could ruin that new high quality shirt you bought or jeopardize the integrity of a rubber ring seal.
Getting rid of pharaoh ants will prove difficult at best. The way these ants colonize is that they have many "mini colonies" that are geographically spread in close proximity but give it the impression of a huge super colony. These ants tend to be very adaptable in that you need to completely rid yourself of all ants and all colonies or another widespread infestation is imminent. During times of treatment and extermination, these ants are known to "weather the storm" by contracting the size of their nests until the treatment has passed at which point they will resume expansion. Since they are able to gain access to the tightest of areas treatment must include all area, from floor to ceailing, to walls and outlets.
So it still begs the questions... How do you get rid of pharaoh ants? The preferred method is a sweet bait that contains borax, or boric acid. The bait traps must be strategically placed along ant trails and the food and water supply. Do not use repellent baits as this will only worsen matters. This will cause the colony to break out and further increase the expansive nature of the mini colonies. Your best bet for treatment is Terro Ant Killer (Liquid Bait).
Again like most ant colonies, the queen is of great importance and needs to be eliminated. The problem with Pharaoh ants, however, is that they have many queens in a single colony. Some people will use insect growth regulators, or IGR, to control pharaoh ants indoors. It's a bait that the ants take back to their nests and fed to the other ants including the queen. The IGR prevents production of foragers by sterilizing the queen. Without worker ants to bring food back to the nest, the colony will eventually die off naturally but this can take weeks or months depending on the size of the colonies and the number of them.