How do I get my VM to a similar to state to that of a fresh installation?
In all likelihood the VM base install is pretty similar to a clean install.
and remove the packages you don't want with a command like (be very careful what you pull):
apt-get remove --purge packagename
How do I properly configure my sources file? (Keep getting public key and package not found errors for the Debian secure repository server, and my college hosts a package mirror that I would like to keep in there.)
(Once the first two questions are answered)
You can find out what distribution you're running by catting out /etc/debian_version. Version 4 is etch, version 5 is lenny.
You need to setup your /etc/apt/sources.list, try something like... (you can put your colleges mirror in place of the debian repositories... but keep in mind for security it'll likely lag a bit behind and they may not mirror ~everything~. Also make sure your distribution name is right-- i do NOT recommend using 'stable' 'unstable' 'testing' 'oldstable' as your distribution name as sometimes this can make a simple upgrade break things horribly. If you're using etch you should be able to use this by opening the file in vi and doing :s/lenny/etch/g :wq)
# Main Debian Mirror
deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free
# Security Updates Mirror
deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free
# Volatile Updates Mirror (SPAM Related Typically)
deb http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatile lenny/volatile main contrib non-free
# Backports from testing/unstable for lenny.
deb http://www.backports.org/debian lenny-backports main contrib non-free
deb-src http://www.backports.org/debian lenny-backports main contrib non-free
(I'll note backports stuff will not be considered for install by default even with it added to the sources list.)
apt-get install debian-keyring debian-archive-keyring debian-backports-keyring
apt-get update && apt-get upgrade
This will update your sources, update your keyrings (or install them if necessary), and then upgrade you to the current release specified.
What other things should I keep in mind and set up other than Apache2, MySQL (or SQLite), SVN, Ruby and Rails?
That really about covers it, don't have any services running and listening on ports you don't absolutely need. Might wanna toss php5 on there for completeness sake, any other scripting languages you want to use either system or web level. Maybe basic smtp.
Keep the system updated and upgraded.