It didn’t really wipe them out. The covert action sanctioned by Jefferson organized by William Eaton did a “regime change”. They installed an emir who was friendlier, the brother of the bad one. He didn’t last the old one came back. However, the European powers clearly embarrassed about what the US showed it could do soon cleared the Mediterranean of them.
By wipe them out, I meant the U.S. put an end to the Barbary Pirates reign of terror. The cowardly European powers were embarrassed, as they should have been, by the upstart Americans.