Jefferson put ships in the Med to attempt to restrain the pirates, but it was Madison under which the Barbary wars finally put an end to it.
He could have done more, in fact Congress was willing to let him do more, but he restrained from expanding his executive power to do so.
https://www.abbevilleinstitute.org/jefferson-and-the-barbary-pirates/
Okay