Capt. Oni Orisan, Operation Hadarin Daji spokesman, who disclosed this to NAN on Saturday said the operations were carried out in Bakura and Anka axis of the state.
According to him, 19 of the bandits were killed in an encounter with the army in the bushes of Anka while the 20 were killed in Bakura.
Orisan reiterated that the soldiers would not attack any repentant bandit.
He, however, said that those unrepentant ones who carry guns and move around in large numbers would be treated as hostile.
He advised the unrepentant bandits to surrender their arms to constituted authorities and embrace the peace initiative of the state government.
NAN reports that since the beginning of the peace and reconciliation initiative about five months ago, peace has returned to many communities.
The Chief of Army Staff, Lt.-Gen. Tukur Buratai visited the state recently, promised that the army would continue to work for the sustenance of peace in the state.