Press a pry bar between the wall and the wet carpet in one corner of the room. Pull the carpet up from the tack strips of adhesive. Roll the carpeting up and remove it from the room. Set carpet in a dry area if you wish to clean it or throw it away if it sustained extensive damage.
Remove the any staples holding down the carpet padding using needle-nose pliers. Grab the staple with the needle-nose pliers and roll the staple out instead of yanking it up from the subfloor.
Roll up the carpet padding and throw it away. If the padding is too large to roll, cut the padding with a utility knife into manageable strips.
Sweep the subfloor. Check for water damage or moisture. Set fans in the room to dry out the subfloor completely.
Unroll new carpet padding. The waffle side of the carpet padding must be facing upward. Lay the carpet padding so it butts up against the tackless strips. Cut the carpet padding to fit the room.
Staple the carpet padding every 6 inches. Press tape on seams to hold them together.