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.