Good housekeeping is the best way to keep carpet beetles away or to eliminate a small infestation.
Keeping synthetic carpets clean of animal hairs or dust is a good start. Dust is largely dead human skin, which carpet beetles can consume.
Keep all foods sealed whenever possible.
If the infestation gets severe, you may find that you need to take more extreme measures. There are commercially-available baiting traps that often work very well. The alternative is to work with a local pest control expert who can safely and effectively eliminate your carpet beetle problem.
With Halloween just around the corner, its time for larger-than-life creepy, crawly creatures skittering across lawns, lurking in dark alleyways and dropping out of nowhere to frighten their hapless victims.