If you're trying to go back to a clean system, as in "fresh install", you need to do a fresh install. Or if you were prescient enough to bare-metal image the system immediately after install, you could go back to that.
Even with Linux's package systems there are configurations and settings that may not be removed in a remove or uninstall. Especially in a server environment, when you need a clean install you cannot simply remove everything you did since the install. You have to cleanly install to get to a clean install state.
UPDATE: Cleaning packages
Ramii.org has some tips for listing packages and cleaning unused packages in a debian system: http://raymii.org/s/tutorials/Debian-apt-get-dpkg-packages-cleanup-commands.html
To list the installed packages:
dpkg --get-selections | cut -f1 | while read pkg; do dpkg -L $pkg | xargs -I'{}' bash -c 'if [ ! -d "{}" ]; then echo "{}"; fi' | tr '\n' '\000' | du -c --files0-from - | tail -1 | sed "s/total/$pkg/"; done | sort -rn > ~/packages.log.txt
He goes on to list methods of listing config files not removed during apt remove processes.
Once you've removed all the packages you wish, run:
apt-get autoremove
and
apt-get clean
to clean the repositories and unused apt files.