Slaughter the majority of exaliating stock over the course of a year and sell the rest as pets.
Not actually serious, but all of the major meat producing animals are slaughtered before their first birthday so phasing it out would take care of the population without needing to release millions of stock.
The real question is whether the species should be reintroduced to nature or not. It isn't like there are wild cattle outside of Africa and maybe Asia other than buffalo anymore*. We would need to take the time to reintroduce feral livestock so they could adapt.
Cattle don't have any of the survival instincts left, and they have been bred to be docile and overproducers of milk and meat. They would die of starvetion or dehydration with swollen udders and any number of horrific diseases.
That's not to say they are better off in factory farms, but if the question is should we reintroduce them to the wild, I would say no.
There are many breeds of cattle. Some which are on their own for most of the year. I am sure with some carefully selection (and maybe a few generations of crossbreeding) there could be viable breeds for reintroduction to most biomes which historically had wild cows