Some members have suggested the use of nukes. But we have to understand that using a nuke, even a tactical one, can lead to nuclear retaliation. Currently all carrier operators have nuke capability.
Besides, a lot of nations don't have nukes yet. Take Iran for instance. They have yet to get nukes and there is a possibility they have to face a carrier battlegroup in the future. So what should they do?
The Russians believed the best way to disable a CBG was to use aircraft and subs to launch AShMs at the CBG until it was at the bottom of the ocean.
For this purpose they built the Oscar II class and Akula class submarines, and the dreaded P-700 Granit (SS-N-19 Shipwreck) and P-270 Moskit (SS-N-22 Sunburn) missiles.
A single Oscar II can carry 24 SS-N-19s, and launch them simultaneously. Check what this missile can do
P-700 Granit - Wikipedia, the free encyclopedia
Also, I watched on tv that when a slavo of SS-N-19s are launched, one missile will climb high and act as a guide to the other missiles flying at sea level. If the 'guide' is shot down, one of the sea-level flying missiles will climb and become a guide. since these missiles travel at Mach 4.5, we can see why it'll be pretty hard to intercept them. They also have a quoted range of 550-625 km
A salvo of SS-N-19s fired at around 75 kms will decimate any carrier, and a lot of the other ships in the CBG. The submarine firing the salvo might be found and destroyed, but that loss will be nothing compared to a CBG.
So a country that is unwilling or incapable of using nukes on a CBG should invest in AShMs, preferrably supersonic ones. They should also have suitable platforms for launching the AShMs. Since SS-N-19 has >300 km range, they can't be legally sold by Russia. But a country like Iran can buy the shorter ranged SS-N-22 or BrahMos AShMs to make up for it.
These missiles don't guarantee a defence against a CBG, but they will increase the chance of taking out the carrier.