To remove bad smell on carpets and rugs, one home remedy is to put Baking Soda powder on them for some time. You can vacuum the powder after leaving it overnight. The powder would have absorbed the bad smell.