The result leaves Donald Trump facing yet another loss in a Western state.
The sweep for Cruz follows his victory, last month, in the state, when he scored nine of 12 available delegates.
Trump and Marco Rubio each won one delegate in Wyoming, while one remained undecided.
Trump still leads the delegate race, with 744; Cruz, 559; and Kasich, 144. The tally needed to win is 1,237.
Cruz was the only candidate to address the convention in Casper, promising to end what he called President Barack Obama’s “war on coal”, if elected. Wyoming is the nation’s leading coal-producing state.
Trump largely bypassed the state.
He said: “I don’t want to waste millions of dollars going out to Wyoming, many months before, to wine and dine, and to essentially pay off these people, because a lot of it’s a pay-off, you understand that?”
Trump’s defeat in Wyoming follows his shut-out, earlier this month, in Colorado, where he failed to pick up a single delegate of the 34 in play. He has urged his supporters to protest the results to state officials.
Trump said: “I guess I’m complaining, ‘cause it’s not fair to the people.” In Wyoming and Colorado, he said, “The people never got a chance to vote.”
Cruz said Trump’s decision not to campaign in Wyoming was telling.
“The reason he decided not to show up is he recognised he couldn’t win. He couldn’t earn the support of conservatives in Wyoming,” Cruz said.
Cruz has benefited from a grassroots campaign in Wyoming, where the Republican machine has detailed rules for delegate selection.
Ed Buchanan, a former Wyoming House speaker, has served as chairman of the Cruz campaign.
“It’s just great to have the support of the Wyoming voters,” Buchanan said. “They share Ted Cruz’s conservation principles, and that’s why we’re successful today.”
Clara Powers, of Wheatland, spoke for Trump on Saturday. She told the crowd she has three grandchildren.
“I do not want any of them working with next-generation science,” Powers said.
“I do not want my grandchildren to believe in evolution. I do not want my grandchildren thinking that global warming is more important than our national security.”
Calling America, “the Saudi Arabia of coal,” Cruz promised to roll back federal regulations he says hamper coal production. The Obama administration has imposed a moratorium on new coal leases.
Wyoming, and other states, have mounted legal challenges, in recent years, to US Environmental Protection Agency regulations that tighten emission limits on coal-fired power plants.