It's the bane of every traveler's existence. Bills are easy enough to convert back, but most banks flat out refuse to change coins.
Basically, change is often money lost unless there's a plan to return in the nearish future. In some places, like Great Britain, this can amount to a significant amount of money, especially with all those £2 coins floating around.
(Then there are those times you find a pile of francs stashed away for future use, never mind they haven't been in circulation for decades now.)
By far, the most effective method for getting rid of—and getting the most value out of—loose coins is by asking a cashier to accept the loose change and paying the remaining balance by credit card. It is one of those simple-enough fixes that seems obvious — only if you had just thought of it.
This is probably the most effective at least a few days in advance before the final departure, when there are still necessary purchases that still need to be transacted, like paying for dinner.
Of course, getting rid of change by buying something like a banana or a candy bar works, but it often involves buying something that you don't really care all that much for.
Outside of that, our favorite societally conscious method could be donating them to charity if there's no want to save it for the next trip.