President Trump has instructed his White House to identify and force out officials across his administration who are not seen as sufficiently loyal, a post-impeachment escalation that administration officials say reflects a new phase of a campaign of retribution and restructuring ahead of the November election.

Johnny McEntee, Trump’s former personal aide who now leads the effort as director of presidential personnel, has begun combing through various agencies with a mandate from the president to oust or sideline political appointees who have not proved their loyalty, according to several administration officials and others familiar with the matter who spoke on the condition of anonymity to discuss internal deliberations.

The push comes in the aftermath of an impeachment process in which several members of Trump’s administration provided damning testimony about his behavior with regard to Ukraine. The stream of officials publicly criticizing Trump’s actions frustrated the president and caused him to fixate on cleaning house after his acquittal this month.

“We want bad people out of our government!” Trump tweeted Feb. 13, kicking off a tumultuous stretch of firings, resignations, controversial appointments and private skirmishes that have since spilled into public view.

The National Security Council, the State Department and the Justice Department are targets of particular focus, according to two administration officials, and there have recently been multiple resignations and reassignments at each of those agencies.

John C. Rood, the official in charge of Defense Department policy who had certified that Ukraine had met anti-corruption obligations, was let go this week. Victoria Coates, the deputy national security adviser who was viewed with suspicion by some White House aides, was removed from her post and was moved to an advisory position in the Energy Department.

McEntee spent part of this week asking officials in various Cabinet agencies to provide names of political appointees working in government who are not fully supportive of Trump’s presidency, according to administration officials.

The president instructed McEntee to find people in the administration who aren’t aligned with Trump and “get rid” of them, according to someone familiar with the president’s directive.

Trump did not provide additional specificity on what exactly he wanted beyond a workforce that more fully reflects his instincts, the person said, and it is unclear what criteria are being used to determine an official’s fealty to the president. McEntee’s discussions with Cabinet ­agencies were first reported by Axios.

The 29-year-old former campaign aide is planning to prepare a presentation for Trump about what he has found. While Sean Doocey, the former director of presidential personnel, reported to acting White House chief of staff Mick Mulvaney’s deputy, McEntee reports directly to the president, according to a senior administration official.

What began as a campaign of retribution against officials who participated in the impeachment process has evolved into a full-scale effort to create an administration more fully in sync with Trump’s id and agenda, according to several officials familiar with the plan. It is unclear whether civil servants will be targeted as well, but it would be harder to dislodge them than removing political appointees. Civil servants, however, could be sidelined in other ways.

As he became the third president in American history to be impeached, Trump seethed against his own appointees who defied White House lawyers to comply with congressional subpoenas and testify about his conduct. The process clarified for Trump and his top advisers that they had not focused enough on personnel in the early part of the presidency, creating a loyalty deficiency the president is moving quickly to correct, officials said.

The burgeoning effort was reflected in Trump’s decision this week to appoint Richard Grenell as the next acting director of national intelligence, placing a fiercely loyal but inexperienced ally atop an intelligence structure against which the president has frequently railed.

Mulvaney used a speech this week at the Oxford Union in Britain to inveigh against the “deep state,” and he lamented that the administration could not fire more agency employees who do not implement the president’s orders. He referred to some of testimony of the witnesses who participated in Trump’s impeachment inquiry.

Bureaucrats who want to make policy instead of implementing it “should put their name on the effing ballot and run” for office, he said during remarks to a group of several hundred people, according to audio of a speech obtained by The Washington Post.

Trump’s family members have been among the main champions of the effort to force out officials who have not proved their devotion to Trump.

Jared Kushner, the president’s son-in-law and a senior adviser in the White House, has played a central role in the push, concentrating more power in the West Wing and working to combat leaks, officials said.

Trump’s son Donald Trump Jr. wrote on Twitter that the impeachment investigation was helpful in “unearthing who all needed to be fired.”

Cliff Sims, a former White House adviser who wrote a book titled “Team of Vipers,” about his time in the White House, has said Trump’s presidency has been repeatedly undermined by disloyal underlings.

“Loyalist shouldn’t be a dirty word,” he said. “Loyalty to the duly elected president and his agenda is exactly what we should expect from our unelected appointees.”

Brendan Buck, a longtime adviser to former House speaker Paul D. Ryan (R-Wis.), said that while Trump is entitled to have political appointees who support his agenda, the purity tests could make it difficult to find qualified people.

“If they also insist on hiring only people who’ve never taken issue with something the president has done, it’s going to be slim pickings,” he said.

Trump selected Grenell, the ambassador to Germany, to lead the intelligence community in place of Joseph Maguire after becoming angry last week when he learned that a U.S. intelligence official had told lawmakers that Russia wants to see him reelected, according to people familiar with the matter.

Grenell has moved quickly to concentrate power within the intelligence agencies. Maguire’s deputy, Andrew P. Hallman, ­resigned Friday. Grenell hired Kash Patel, a National Security Council aide who has worked in the past to cast doubt on the FBI’s investigation into Russian election interference. Grenell has requested access to information from the C.I.A. and other intelligence agencies, the New York Times reported, citing two people familiar with the matter.

The moves reflect the skeptical view the president has had of the intelligence community after his campaign’s links to Russia were investigated and several of his associates were prosecuted.

The anger extends beyond the intelligence agencies, and Trump has also called for law enforcement officials who investigated his campaign to be investigated or prosecuted. Even some Trump allies are feeling heat over not being aggressive enough about taking on the president’s perceived enemies.

At a donor roundtable Tuesday at the Montage Hotel in Los Angeles, one participant pointedly questioned Senate Judiciary Committee Chairman Lindsey O. Graham (R-S.C.) on why he was not holding accountable people who were responsible for the Russia investigation.

“I see you on Fox News every night, and then you do nothing about it. What are you going to do about it?” the donor asked, according to an attendee.

“What a fantastic question!” Trump said.

Meanwhile, administration officials are conducting a search for the “Anonymous” author of a tell-all book about Trump titled “A Warning,” according to White House trade adviser Peter Navarro, who told CNN on Friday that the search had become a “vocation with everybody.”

McEntee, who lost his job in 2018 over concerns about his online gambling, has long expressed an interest in the personnel office despite having no previous government experience, two administration officials said. Within the West Wing, he is seen as fiercely devoted to the president and is well liked by first lady Melania Trump, the officials said.

Some within the White House have bristled at his lack of experience and aggressive approach to ferreting out “Never Trumpers.”

McEntee “does not have the relevant experience to do this job, unless the job is to purge Never Trumpers and reward loyalists,” one official said.

Another senior administration official countered that McEntee was talented and up to the task, with the key qualification of having the president’s confidence.

As he gears up for the reelection contest, Trump has moved to surround himself with longtime allies who have proved their devotion to him while pushing away those who have not earned his trust.

This month, Trump rehired Hope Hicks, one of his longest-serving aides and closest confidants.

During a podcast interview last week, Trump concurred when Fox News analyst Geraldo Rivera described the White House as “a nest of vipers and snitches and backstabbers and rats.”

“I inherited a place with, you know, many different administrations, and they worked there for years and were civil service and with unions and all of it,” he said on Rivera’s “Roadkill” podcast. “You can’t do what you’d like to do.”