If you're selling your home mostly as is, with carpet that's a few years old, you'll need to give it a complete and thorough cleaning before you show the home. Even if you recently installed new carpet, you may have had to continue living in the house with your pets before you put your home on the market.
Don't skimp on the carpet cleaning. A basic vacuum job is not going to be enough to remove any pet hair or dander tracked around by your dogs or cats. Hiring a carpet cleaning service will save you time but will require more of a monetary investment. If you want to clean the carpet yourself be very thorough and detail oriented.
First, make sure your vacuum is emptied and cleaned to remove any hair or dander inside. Vacuum all the large areas of the carpet before moving on to the edges around your baseboard. Move slowly around the baseboard with a narrow hose attachment and look closely to make sure you're removing all debris (especially stray kitty litter!). If you have multiple pets or full-time indoor pets, you will likely need to go over your carpets 2-3 times to completely remove hair from all the fibers. Don't take a shortcut, take the time to prepare the carpet for cleaning thoroughly.
Second, rent a carpet cleaner from your local hardware store or grocery store. In most cities carpet cleaners are readily available at large grocery and hardware chains for a daily rental fee. Rental companies typically provide the cleaning chemicals for purchase along with the rental. Consider purchasing a spot-treatment compound as well. When you start moving furniture you might find some unknown stains you'll need to remove. Spend the few extra dollars to rent the machine the night before you want to clean so you can start on your carpet early the next day.
Third, starting top down (if you have a multi-story home or unit) clear out furniture as much as possible from the initial rooms you want to clean. Be aware that the carpet will need time to dry so this project will take multiple days, depending on your home size. When working in bedrooms start early in the day to allow ample drying time so you can replace beds in each room and get a good night's sleep for the second day of cleaning. Before you start in with the machine check the carpet thoroughly for stains and apply the stain treatment before you clean the entire carpet, this will allow the chemicals time to penetrate the fibers and lift the stain for the best possible results. Once you treat the stains (following the directions on the chemical you purchased), begin carefully going over the carpet one row at a time. Make sure you overlap your rows and always move the machine in the same direction.
It will be difficult to see results before the carpet dries, but you should be able to gauge stain removal when the carpets are about 50% dry. Check the stains you treated and see if you need to apply a second treatment to minimize them further. If you expect your buyer to replace the carpet, it may not seem worth it to spend additional time on one stain. Even if they plan to renovate, many buyers have a difficult time imagining changes to their space without imagining themselves in it. A clean canvas can make the difference to whether or not someone sees themselves in your home.
Lastly, check your carpets for any areas that your pet (cat) has scratched up. If needed, trim a handful of fibers from an area of carpet that is unlikely to be seen such as the back of a bedroom closet. Trim the knap carefully, so you're only taking the top of the fiber and not creating a bald spot in a new place. Then take the trimmed strands and attached them to the damaged area with a hot-melt glue until you've covered all the scratches.
With fresh flooring, beautiful carpet and a clean canvas of walls and doors your home is ready for show. One last tip! If at all possible remove your pets from the house before you have prospective buyers over. While an animal in the yard is okay, the presence of animals inside may cause your buyers to worry about damage even if you have made the necessary repairs. Ask a friend or neighbor to house your cats and indoor pets during the open house, so you have the opportunity to best show off your home.