memory allocation error in aptitude 17. Jun 2008

If you encounter the following error while searching with aptitude or apt-cache

terminate called after throwing an instance of 'std::bad_alloc'
what(): St9bad_alloc
Aborted

you might be able to resolve the situation easily with a

sudo aptitude clean

which at least helped in my case.