For the future, you might want to run something like this in a daily
cron job:
dpkg --get-selection > /etc/package.selections
Put it somewhere where it will be picked up by your backups. Then, if this
happens again, you can do
dpkg --set-selections < /etc/package.selections &&\
apt-get dselect-upgrade
to reinstall all your previously-installed packages. If you restore /etc
before doing that, you can keep your existing configuration settings and
UID/GIDs, etc.
Keith