Thanks for the replies.
I doubt the larvae got in there though vacuuming a moth infested rug, because it's not been used for ten years. It's possible the eggs have been dormant for that long, but I think the eggs were more likely laid this year.
I'm hesitant to use poisons because they will be sprayed out of the vacuum cleaner's vent, when switched on. Is there anything I can use which won't leave any residue? I'd also rather remove the larvae, rather than simply kill them because they'll rot, which won't be pleasant either.
Yes, it's a wet vac' but it has separate filters for wet and dry and it's currently fitted with the latter. The wet filter is lost amongst the rubbish. I could try washing it in hot water and strong detergent, but it's not designed for it and it will take a long time to dry. I'll have a look into buying a replacement filter. Using the vacuum for the last time, before dumpling it could also be an option, but it's my dad's and I think he wants to keep it.
Would putting the filter in a bag and deep freezing it work? That might kill the larvae but it probably wouldn't harm any unhatched eggs and there's still the issue of removing them.
I like the compressed air idea, but don't have a compressor. I wonder if canned air would do? I suppose I need to be careful not to blast the little buggers to pieces, which would be messy.
Currently the vacuum is in the back garden, protected from the rain by a bucket. Is leaving it outside for long enough for the larvae to turn into moths and bugger off, a viable solution? I suppose it could take awhile and there's the risk of them damaging the filter if they run out of dirt to eat.
Has anyone else had problems with household appliances or electronics being infested with vermin? If so, what did they do?