Three police officers were injured when missiles were thrown and crowds dispersed at Cardiff Bay.
South Wales Police said two people were arrested on suspicion of public order offences on Tuesday night and since released on bail.
A second day of good weather in Wales has prompted police representatives to warn against illegal gatherings.
On Tuesday as temperatures topped 21C, tourist spots saw an influx of visitors.
South Wales Police said officers intervened in an "incident of violent disorder" in Cardiff Bay at about 22:00 BST on Tuesday.
It said a number of missiles, including bottles, were thrown at officers, three of whom suffered minor injuries.
A 21-year-old man and 16-year-old boy were arrested and a knife was found.
Cardiff and the Vale of Glamorgan Ch Insp Tony Williams said: "The violence levelled at officers was despicable and will not be tolerated, nor will we tolerate the antisocial behaviour and criminality displayed by the minority on Tuesday evening."
He said increased patrols would be carried out in key areas.
He appealed for people to "take a sensible approach and to continue supporting the restrictions that do remain in place, in order to keep us all safe".
A video taken on the steps of the Senedd showing the area strewn with empty bottles, carrier bags and cardboard beer boxes was later shared on Twitter.
Cardiff council said it had taken three hours to clean up the "unacceptable amount of litter" in Cardiff Bay and parks.
A spokesman added: "We would ask visitors enjoying these areas to dispose of their waste responsibly and, if a bin is full, take it to an empty one or take it home with them.
"Current Covid-19 restrictions allow up to six people from two households to meet outdoors while socially distanced and we would urge visitors to Cardiff Bay and to our parks and green spaces to follow these rules and help keep Cardiff safe."
With similar temperatures on Wednesday, South Wales Police Federation (SWPF) urged people to follow Covid rules.
Six people from two households are now allowed to meet outside, including in private gardens, but mass gatherings remain illegal.
With highs of 21C on Tuesday, Wales recorded its warmest March day since the mercury peaked at 22.2C in Porthmadog, Gwynedd recorded, on 24 March 2012.
Steve Treharne, chair of SWPF, told Claire Summers on BBC Radio Wales Breakfast: "People have lost loved ones, people's businesses have been affected and it's really important that people are responsible so we can all get out of this together as safely as we can.
"As the rules are sort of relaxed there will be people who will want to push the boundaries and go beyond those boundaries into the next stage of what they can and can't do."
God knows what can be done about it but #Pontcanna Fields is horrific this morning. 3 or 4 big patches like this. Pity the @cardiffcouncil crews who have to clear it. @WalesOnline @Keep_Wales_Tidy pic.twitter.com/ph1mQ7nO9C— The Cardiff Podcast (@CardiffPod) March 31, 2021
While most had abided by the regulations "we do get the people who sort of don't believe the rules should impact upon what they can do", Mr Treharne continued.
"I'd just ask people to be a little bit responsible now as we come to the end of the tunnel."
He urged people to following the rules by "not having the illegal gatherings, the mass gatherings, the house parties".
Responding to the video of litter left outside the Senedd, Cardiff restaurateur and pub owner Cerys Furlong tweeted: "This is rubbish - pubs, restaurants and cafes PAY to dispose of normally.
"Instead taxpayers picking up this bill. Why not let licensed, regulated venues be part of the solution instead of seeing us as the problem?"
One person in Cardiff tweeted a video of a rubbish-strewn park, adding: "Pontcanna Fields is horrific this morning."
In Carmarthenshire, groups of up to 100 teenagers have been moved on and large amounts of alcohol seized after police responded to reports of anti-social behaviour near the coastal path in Burry Port.
It followed on from Saturday when about 50 teenagers were dispersed near woodland in the area.
Dyfed-Powys Police Sgt Gemma Davies said: "We would like to appeal directly to parents to be aware of where their children are, and what they are doing.
"This behaviour is distressing for people living in Burry Port and we are urging you to be accountable for your children's actions.
"We understand that the past few months have been difficult, and that children want to see their friends, but please do your best to ensure they are adhering to regulations that are in place for all our safety."
Michael Butterfield, from Llangattock Litter Pickers in Powys, said he had seen an increase in the amount of litter since restrictions had started to ease.
"For the end of March, we have collected 175 bags of litter, which might not sound like a lot, but actually, it is," he said.
"Since the lockdown, we have been seeing more PPE - facemasks predominantly - but the main litter we see out on the verges are drinks - so cans, bottles, single-use cups."
The highest March temperature in Wales is 23.9C, which was recorded in Prestatyn, Denbighshire and Ceinws, Powys, on 29 March 1965.