Give it a good vac to remove the loose pile and as many larvae as possible, the spray with a good insecticide under all the standing furniture. If you have not a proprietary insecticide use a good dog flea residual spray.
In 25 yrs I have not seen as much carpet moth and carpet beetle damage as this year. At one property the moths were flying up out of the carpet a dozen at a time, the room was covered in them, the carpet took a bashing as well.
Put a search in on Ixquick.com for carpet beetle and carpet moth, two different creatures and different lifestyles.
Trevor