In a statement by presidential spokesman Garba Shehu, said Buhari gave these warning at a meeting with Katsina state Governor Aminu Masari.
The president also commiserated with Governor Masari over the loss of lives in the said attacks.
Some of the Nigerians who lost their lives to recent attacks include Abdulhamid Sani, chairman of the All Progressives Congress (APC) in Batsari local government area, and Abu Atiku, district head of Yantumaki in Danmusa local government area of Katsina state.
According to president BUHARI, the bandits, who have committed crimes against innocent citizens of Nigeria in the state and across the country will not go unpunished.
He said more decisive military operations against them in Zamfara, Sokoto, Niger, Katsina, and Kaduna states.
On Tuesday, Governor Masari announced that the state had pulled out of the peace deal
it had with bandits. The state government had entered a peace agreement with the gunmen, but they still carried out attacks.
Governor Masari said the gunmen betrayed the trust his administration put in them despite doing its best to ensure peaceful coexistence in the state.