Low on disk space after compiling new kernel.

Mulyadi Santosa mulyadi.santosa at gmail.com
Mon Dec 20 03:45:26 EST 2010


Hi Rishi....

On Mon, Dec 20, 2010 at 13:48, Rishi Agrawal <rishi.b.agrawal at gmail.com> wrote:
> Hi All,
>
> I installed the kernel 2.6.36 into my Fedora 12 system.
>
> I am now low on disk space.
>
> [root at rishi-desktop kernels]# du -sh linux-2.6.36/
> 4.4G    linux-2.6.36/

Hm, I think that's rather big....here after compilation (of course, my
.config is likely different than yours), 2.6.36 takes approximately
1.7 GiB
>
> It shows that the new compiled kernel is taking around 4.4GB.

Together with the object files during linking stage, I believe :)

> I wanted to free some of the space occupied by the compiled code. I
> understand that the /lib/modules/2.6.36 directory can't be deleted as it
> contains the compiled modules.

Yup...

> I wanted to delete the files in /usr/src/kernel/2.6.36, without effecting my
> newly installed kernel.
>
> -> Can I delete them?

AFAIK, /lib/modules/<version>/build is symlink-ed to that source code
dir, so IMHO don't delete it..

> -> What is the best way to delete them, I want to keep the source files?

I think the best way here is to do "make clean" and then followed by
"make modules_prepare". That way, your kernel source dir is build with
files enough to compile external modules whenever needed, but not too
bloated

-- 
regards,

Mulyadi Santosa
Freelance Linux trainer and consultant

blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com



More information about the Kernelnewbies mailing list