South African Prime Minister Pieter W. Botha announced his first major Cabinet shuffle today, ousting the controversial right-wing minister of police and prisons, Jimmy Kruger.

At the same time, Botha backed down on key provisions of a controversial bill that would have forced reporters to submit to the government reports about official corruption before publication.

The government, however, retained other segments of the legislation that are viewed widely as potentially repressive and enacted a separate law that limits reporting of police activities.

The Cabinet reshuffle was seen as an attempt by the prime minister to place his own stamp on the Cabinet and clear the air after a slush fund scandal that led to the resignation of former prime minister John Vorster from the ceremonial post of president.

In addition to dropping Kruger, Botha elevated Andries Treurnicht to minister of public works, a full Cabinet position. Treurnicht is the leader of the ruling National Party's powerful Transvaal Province organization, an dthe move was seen as a concession to the party's right wing.

Several other Cabinet members switched jobs, but the major posts were untouched. Botha will continue to act as defense minister in addition to his duties as prime minister, Owen Horwood remains finance minister and Piet Koornhof retains the portfolio for black affairs.

Horwood's alleged role in the coverup of the funds scandal in the now-disbanded Information Department has been the focus of controversy here and Botha's decision to keep him in the Cabinet suggests that he will stand by Horwood for the time being.

Many of the key changes were made possible by the resignation last week of Vorster, who stepped down after a government commission accused him of condoning and covering up irregularities in the secret, multimillion-dollar Information Department propaganda campaign.

The National Party Wednesday chose Marais Viljoen to succeed Vorster. Kruger, who was criticized widely for his handling of the 1977 death in police detention of black activist Steve Biko, succeeded Viljoen in the largely ceremonial post of Senate president.

Botha's appointments, announced in Parliament, appeared to reflect his moderate approach to South Africa's racial policies and his penchant for streamlined administration. Many of his choices were younger members of the National Party's reform-oriented wing.

In bringing in Treurnicht, however, Botha recognized the strength of the party's right and named a potential political rival to the Cabinet.

The surprise decision to back away from the bill restricting reports on official corruption followed international criticism and a massive outcry from both the English-language and the pro-government Afrikaans-language press, as well as from bar associations and the public.

Under the corruption bill's original provisions, all allegations of official corruption would have been investigated by a government-appointed advocate general before they could be reported.

Botha said although reporting restrictions would be dropped, the principle of an advocate general would remain, and people with knowledge of corruption would have to report it for investigation.