Polygraph everyone in the FBI and State Department. Before doing it, offer everyone the opportunity to resign gracefully with no action to be taken against them. The only price to pay is they will never work in government again.
The ones that stick around and who fail the polygraph will be fired and if found to be part of the deep state can be indicted on charges of sedition.
The top 3 levels of the FBI will be fully purged and people who passed the polygraph promoted.