There are many different ways, you just have to settle on one that you feel most comfortable with. If you can afford it or own one, a steam jet cleaner works well for both wood and metal. Make sure it heats the metal enough to allow the water to evaporate quickly.
Some will say running just the wood through the dishwasher works well.
Others will say mineral spirits on the metal will wash it up nicely.
I know a fellow who left a rifle in the sun at the range in a garbage bag wrapped in paper towel and allowed the cosmo to melt off.
Break free powder blast works, but beware of flash rusting if you don't oil up. This applies to alot of cleaners and old metal.
If anything you have to make 100% sure the action, trigger, chamber, bore, bolt is clear of cosmo, for your own safety. The stock is secondary but it is highly recommended to take everything apart to clean.