Elon Musk arrived in the nation’s capital with the chain-saw-wielding swagger of a tech titan who had never met a problem he couldn’t solve with lots of money, long hours or a well-calibrated algorithm.

President Donald Trump was delighted to have the world’s richest person — and a top campaign donor — working in his administration, talking about how he was “a smart guy” who “really cares for our country.”

Musk was suddenly everywhere — holding forth in Cabinet meetings while wearing a “tech support” shirt and black MAGA hat, hoisting his young son on his shoulders in the Oval Office, flying aboard Air Force One, sleeping in the White House. Democrats described the billionaire entrepreneur as Trump’s “co-president.”

Now that’s over. Musk said this week that he’s leaving his job as a senior adviser, an announcement that came after he revealed his plan to curtail political donations and he criticized the centerpiece of Trump’s legislative agenda.

It’s a quiet exit after a turbulent entrance, and he is trailed by upheaval and unmet expectations. Thousands of people were laid off indiscriminately or pushed out — hundreds of whom had to be rehired — and some federal agencies were eviscerated.

But no one has been prosecuted for the fraud. Musk reduced his target for cutting spending from $2 trillion to $1 trillion to $150 billion, and even that goal may not be reached.

Racing on stage at a campaign rally one month before the election, he jumped for joy next to Trump, his T-shirt rising to expose his midriff. Musk had sold Trump on his idea for a Department of Government Efficiency while also putting at least $250 million behind his candidacy.

Musk deployed software engineers who burrowed into sensitive databases, troubling career officials who sometimes chose to resign rather than go along. Trump brushed off concerns about Musk’s lack of experience in public service or conflicts of interest from his billions of dollars in federal contracts.

His language was that of catastrophism. Excessive spending was a crisis that could be solved only by drastic measures, Musk claimed, and “if we don’t do this, America will go bankrupt.”

But even though he talked about his work in existential terms, he treated the White House like a playground. He took his children to a meeting with the Indian prime minister. He let the president turn the driveway into a makeshift Tesla showroom to help boost sales. He installed an oversize screen in his office that he occasionally used to play video games.

Firing federal workers

From the beginning, Musk treated federal workers with contempt. At best, they were inefficient; at worst, they were committing fraud.

His team offered them a “fork in the road,” meaning they could get paid to quit. Probationary employees, generally people new on the job without full civil service protection, were shown the door.

Anyone who stayed faced escalating demands, such as what became known as the “five things” emails. Musk wanted every government employee to submit a list of five things they accomplished in the previous week, and he claimed that “failure to respond will be taken as a resignation.”

One day in February, Musk posted “CFPB RIP,” plus an emoji of a tombstone. The headquarters of the Consumer Financial Protection Bureau, created after the Great Recession to protect Americans from fraud and deceptive practices, was shut down, and employees were ordered to stop working.

Musk had started gutting the U.S. Agency for International Development, a pillar of the country’s foreign policy establishment and the world’s largest provider of humanitarian assistance.

“Spent the weekend feeding USAID into a wood chipper,” he bragged.

The Food and Drug Administration, which is responsible for ensuring the safety of products from baby formula to biotech drugs, planned to lay off 3,500 employees. But the agency was forced to rehire people who initially were deemed expendable.

Commissioner Marty Makary, who started his job after many of the cuts took place, told attendees at a recent conference that “it was hard and my job is to make sure we can heal from that.”

There are also concerns about safety on public lands. The National Park Service has been bleeding staff, leaving fewer people to maintain trails, clean restrooms and guide visitors. More cuts at the Forest Service could undermine efforts to prevent and fight wildfires.

The Environmental Protection Agency faces a broad overhaul, such as gutting the Office of Research and Development, which was responsible for improving air pollution monitoring and discovering harmful chemicals in drinking water.

Not even low-profile organizations were exempt. Trump ordered the downsizing of the U.S. Institute of Peace, a nonprofit think tank created by Congress, and Musk’s team showed up to carry out his plan. The organizations’ leaders were deposed, then reinstated after a court battle.

Pentagon cuts, gains

Thousands of civilian workers were pushed out at the Pentagon, and Defense Secretary Pete Hegseth is reducing the ranks of top generals and looking to consolidate various commands and save money.

However, the Pentagon budget would increase by $150 billion, for a total of more than $900 billion, under Trump’s spending proposal working its way through Congress.

Musk also faced blowback for targeting Social Security, which provides monthly benefits to retirees and some children. He suggested that the popular program was “a Ponzi scheme” and the government could save $500 billion to $700 billion by tackling waste and fraud.

His popularity cratered even though Americans often agreed with his premise that the federal government is bloated and wasteful, according to polling from The Associated Press-NORC Center for Public Affairs Research.

Just 33% of U.S. adults had a favorable view of Musk in April, down from 41% in December. In addition, 65% said Musk had too much influence over the federal government.

Modest results

During a campaign rally in October, Musk said he could find “at least $2 trillion” in spending cuts. In January, before Trump was inaugurated, he revised by saying, “if we try for $2 trillion, we’ve got a good shot at getting 1.”

But in April, at a Cabinet meeting, Musk provided a different target. He was “excited to announce” that they could reach $150 billion in savings during the current fiscal year.

In the end, said Alex Nowrasteh, vice president for economic and social policy studies for the libertarian think tank Cato Institute, “they set themselves up for failure.”