I think it would be really useful (and cool) to be able to get all the source code for my current Ubuntu installation. I mean everything, every last package from the kernel all the way up to user interface details.
(One situation where this would be useful is when there is some kind of error message that I don't understand what it means and don't know exactly where it came from, like the infamous "system program problem detected" popup. I don't know which package is responsible for presenting that. If I had all the source code I could simply search for the error message string to find the relevant part of the code. That could help me understand what happened and possibly modify the code slightly to add more details in the error message, or whatever, and rebuild that package.)
Assuming that I installed everything using apt, I can get the source code for any individual package x using apt-get source x so I guess it should be possible to write a script that first gets a list of the names of all currently installed packages, and then use a loop to get the source code using apt-get source for each package one by one. My question is: is there a more convenient way of getting all source code for all software I currently have installed, perhaps using a single command?