A bad smell inside a fridge is usually caused by food forgotten in a back corner until it has spoiled and gone bad. If you have a bad odour outside your fridge that never goes away, then the cause could be a leak from your fridge.
Fridge leaks occur in units with water dispensers or automatic ice makers, because they are connected to your water supply. Plastic tubing carries water up inside your fridge. If that tubing ruptures, it can cause a water leak in your fridge. Water from the leak usually collects at two places -- either in the condenser pan beneath the fridge or on the wall and floor behind the unit.
Too much water in a fridge's condenser pan can trap dust and food particles, which in turn can attract bacteria. This leads to an unpleasant, rotting odour wafting out from under the fridge. The wet pan can also be a site for mould growth, leading to the foul, musty odour of mildew and mould. If the leak sends water onto the floor or into the wall, mould can grow there. In addition, the water and mould can damage paint, drywall and flooring. Mould from the leak could spread inside your home's walls.
Fixing a fridge leak and cleaning up or repairing damage will eliminate the bad odour. Water supply tubing can be purchased at appliance stores. Use a new one to replace the damaged, leaking line. Pull the condenser pan out from under the fridge. Rinse off any debris or mould and then scrub the pan with undiluted white vinegar and dry it thoroughly. Dry a wet wall or floor with a fan. If you can see a patch of mould growth, brush it away and dispose of it outside. Next, clean the moulded area with a solution of 120 ml (1/2 cup) of bleach in a gallon of water.
If the leak has soaked the wall behind your fridge, the plasterboard needs to be replaced. If you see mould inside the wall or if the patch of mould behind your fridge is larger than 0.2 square metres (2 square feet), contact a mould remediation specialist to clean away the fungus and patch the wall. If you feel like the bad odour is lingering, wipe down the exterior of your fridge with a solution of 1 part white vinegar and 1 part water to deodorise the whole appliance.