First vacuum, make sure you look for caterpillar like babies too. Wash all fabric in very hot, soapy water and you can add Borax. Use a steam cleaner on carpets.
This tiny beetles are driven away by the following ways.
1.Always ensure that your carpet is washed
2.use vacuum cleaner to suck them out
3.use insecticide such as Boric acid.
If you live in an apartment, you can get the building manager to call the exterminator. Or, you can apply Borax liberally into the carpet and rub it in.