I've used coffee grounds to get ants out of pots, too. It's still just driving them somewhere else, and that's just not good enough for me. Often when a nest is moved, the ants hatch another queen, and then you will have two nests where you only had one before. It's called 'budding'. The problem multiplies if you just make them move.
Especially fire ants, because I am becoming increasingly allergic to their stings I need to kill the nests. They are non-native, so do not belong to the local eco-system so I feel no regret whatsoever in going after them with the big guns.