I've been learning the shell for a few weeks and have installed several packages. I know/remember what some of them are, like oh-my-zsh and emacs 24 (which was a nightmare to upgrade to), but not sure sure about what else. I've used different methods like curl, wget and Macports.
My question is, if and when I want to do a clean installation of MacOS, how do I backup or script a fresh installation of these packages? In other words, when I do a new install of MacOS I won't be restoring from Time Machine using Migration Assistant: rather I'll install the system and manually restore files. How do I know the installation paths and dependancies of what I've installed in my previous installation using the command line? Is there a txt file somewhere that the system maintains to keep track of what has been installed?
(MacOS 10.8.2)