Important Kernel Files
Ok. I will try to make myself as clear as possible.
I just ventured into the land of compiling kernels. I have done this successfully and am currently running the most up to date one. The thing is that I have a lot of junk left over and I don't know what is safe to get rid of. Here is my take on things.
I need to keep vmlinuz, initrd, and System.map (unsure about config)
I need to keep everything here.
I have no idea what I need to keep or discard here.
If the kernel installation put files elsewhere, could anyone let me know the possible places.
I tried searching for this question but never got a cut and dry answer. If someone could point me towards the right direction it would be greatly appreciated!
The /usr/src directory contains the kernel source tree, which you must have if you also interested in building the loadable kernel modules.
But after I have completed building the kernel and the modules, there is no further use for it, right? I just have some space contraints and need to know what I can keep or throw away.
I did some further research and it is my belief that I really only need the files in /boot and /lib/modules. Can anyone verify this?
That's right, you don't need anything in /usr/src/ once you've finished compiling everything. Generally a good idea to keep the .config though, so you can recompile the exact same kernel configuration another time if needed.
If you want to use the linux system as a desktop OS, or for application programming then your thinking is correct.
If you want to develop some code which you would like to run in kernel space (LKM), then you will require this directory.