Sadly dpkg or apt dosn't keep a log of what packages were installed / removed and when, as far as I know. The best shot here is to look through your .bash_history and try to find what you modifyed. (You do know that
dpkg -l will show you all packages that are installed configured etc. right?)
To properly purge a package use:
apt-get remove --purge <package>
To reconfigure ALL packages on your system use the following command (as root):
dpkg -l | cut -d " " -f3 | xargs dpkg-reconfigure
Be aware that this will possibly take some time.
These tools are capable of getting a lot of configuration "reseted" but they are incapable of magic. If you messed up your system really bad then the best solution sometimes is to back-up everything and reinstall.
You can use
dpkg-reconfigure <package-name> to "reset" most packages to their defaults; but no-one knows what you installed with your systems main install except you.
You could search for which packages a "default" installation puts on your machine and remove everything else, but then again we can't know what you installed with your system's base install.