Some 250 people have been arrested during a week-long operation in Mathare targeting the illegal Mungiki sect.
The sect, made up of members of the Kikuyu community, is believed to be responsible for a series of beheadings.
Our correspondent in Nairobi says that a fragile calm has returned to Mathare, home to half a million people.
But many residents, says the BBC’s Karen Allen, say they fear there may be further trouble in the days ahead.
"I’m just leaving with a few personal items but I have nowhere to go and I don’t know what will happen in future," one man said.
Police moved into the shanty town to carry out house-to-house searches for weapons and sect members on Tuesday.
Members of the Mungiki sect, inspired by the 1950s Mau Mau uprising against British rule, have been accused of being behind a string of gruesome murders.
Thirty people, including policemen, were killed earlier in the week.
Police have denied using excessive force during the wave of arrests but television pictures showed police beating people and burning down shacks.