Frank Hellmuth wrote:
Hi!

I noticed today that I have linux-2.4.20-gentoo-r3, -r4 and -r5 sources
on my hard disk, working and backup kernel are both r5.

Every time a kernel source package is emerged portage makes a record of all files and dirs placed on your system. When upgrading the kernel sources old ones are not removed for precautionary purposes.


Now, when unmerging a kernel source package the source directory is also not removed. The reason is that kernel compilation creates many files in addition to the initial list that portage keeps track of and so once portage has removed those files which it initially placed on your system the remainder of files and directories are left behind in case they are of any use to you.

#emerge clean

tells me there are no outdated packages on my system. I understand
that the kernel sources are an important part of the system, but since
I slowly run out of disk space I'ld like to get rid of r3 and r4.
Is it safe to do a

#emerge -C linux-2.4.20-gentoo-r3 linux-2.4.20-gentoo-r4

The proper way to deal with the removal of outdated versions of packages is as below.


$ emerge --prune gentoo-sources -p

>>> These are the packages that I would unmerge:

 sys-kernel/gentoo-sources
    selected: none
   protected: 2.4.20-r5
     omitted: none

>>> prune: No packages selected for removal.

If you have lots of outdated gentoo sources versions then this will remove them for you in one step.

Please also investigate emerge -p --depclean by typing emerge --help.

or are the old versions (or at least the headers) still needed?

No. You only need your .config file for migration to newer kernels.


If it's OK to clean them, why doesn't portage do it by itself when updating?

Portage does not take the initiative of migrating to newer versions of kernel for you. Many users prefer not to upgrade kernels since they are particularly delicate and time consuming to upgrade. As a result, the fact that portage does not remove the old one preserves your old settings and your old sources in case you wish to continue using them.


I hope that makes things clearer for you.


-- [EMAIL PROTECTED] mailing list



Reply via email to