Arrests were made before City's 2-1 victory over Rovers in the Johnstone's Paint Trophy tie at Ashton Gate.
And there was further disorder when mounted police were called on to disperse supporters who ran onto the pitch at the end of the game - the first derby in the city since 2007.
In total there were 12 home supporters and six away fans arrested while 16 people, including a police officer and a steward, were treated by the Fast Ambulance Service.
And match commander Chief Superintendent Caroline Peters said: "The majority of fans were well behaved and enjoyed the match.
"However there was a small minority who came with the sole intention of trying to spoil the enjoyment for the majority.
"We warned before the match that we would not tolerate any form of anti-social behaviour or violence.
"We will now aim to bring the offenders to justice using CCTV coverage and other intelligence and information gathered to bring the offenders to justice."
Both managers condemned the disorder following the game.
City manager Sean O'Driscoll said: "Up until the final whistle I thought it was tremendous. Great support, credit to Bristol Rovers as their support was excellent.
"The scenes at the end were disgraceful. It's taking the shine off a good victory for us. That's what people will be talking about - not the game.
"You'd think we'd got promoted to the Championship and not the second round of the Johnstone's Paint Trophy. That's the shame of the whole thing - it's ridiculous."
Rovers boss John Ward added: "You don't want people on the pitch, it's all about the players. It's ridiculous that they come on the pitch and goad opposition fans, and why people can't behave themselves at a football match is beyond me."
A subsequent statement from City read: "This sort of behaviour is unacceptable and cannot be tolerated. We believe strongly Bristol City is a family friendly club, which is safe for supporters of all ages.
"We will be working closely with the Police and authorities, including the use of CCTV and imagery, to help identify those involved. Bristol City Football Club will take the strongest possible action against anyone found guilty of violent conduct."