it would depend on the species if it works, but I would just try to make them uncomfortable, so they'll look for a better spot.
I was into ants for a while, tried to keep ant colonies(failed, because my mother didn't allow me to put my starting colonies in the fridge, so couldn't give them the hibernation they needed).
generally, I would say ants are not such a problem. they don't eat plants directly. leafcutter ants will devestate plants, but assuming you don't live in a tropical area, you won't be finding them outside.
they do farm aphids(at least, some species do), but most species are oppurtunistic, if they find aphids they'll start farming them, and maybe move them to a plant closeby, but they won't introduce aphids that are not already around there(only exception I know is lasius flavus, those mostly stay underground and farm root-aphids. they should be somewhat common around here but I don't think I've ever seen them, or I confused them with another species).
however in your case, since you're in pots, they may disturb the roots just by digging around and taking up space(I've had them directly underneath my plants in full soil, and that didn't bother the plants at all, but in a pot space is more limited, so than it might be a problem).
now about making them uncomfortable, from my limited experience there's a big difference between species. my parents'neighbour once asked me to get rid of a big colony of lasius niger(the most common ant around here) in her backyard. poured around 20-30 full pans of boiling water into that colony, but that didn't bother them too much. they were throwing out corpses of winged queens and males for a few days, then continueed business as usual.
however once while prepping a patch of soil(removing grass and digging about to loosen it up), I stumbled upon a colony of (probably) myrmica rubra. myrmica rubra can sting, so I left the soil alone for half an hour and when I returned the whole colony had already packed up and left.
if encouraging them to move fails, you'll probably have to resort to poison, or dig them up. if you go poison, you have to choose the right poison though. if it just lures and kills workerants it's not usefull, the explorers, who will find ot first, are the most expendable members of the colony. you want to get to the queen to get rid of the whole colony. so you need a poison that they'll carry with them into the nest and feed to the queen.