Turn off the power to the outlets and switches in the garage at your home's main electrical box.
Remove the plate covers from the outlets and switches. Check them with a voltage tester. If you get a reading on any of them, return to the electrical box and switch off the correct circuits.
Remove the outlets and switches from the electrical boxes in the walls.
Examine the electrical boxes to see if there are any open knockout holes that don't have any electrical cables. Place insulated covers on the holes.
Spray expanding foam insulation into the gaps around the outer edge of the electrical box. Do not use the insulation inside the electrical box.
Reinstall the outlets and switches. Place foam gaskets over them, then screw the plate covers back into place.
Spray expanding foam insulation around the box where the cables enter it if the box is not set inside the wall.