# delete old files ???

## wesw02

hey quick dumb question, i update my kernel to 2.6.9-r3 should i delete /usr/src/linux-2.6.9-r1 (the old kernel files) ?

----------

## cram

As long as you're sure you won't need to go back to that kernel, then sure go ahead.

----------

## pjp

Might be worth keeping .config and System.map (if you aren't already).

Moved from Installing Gentoo.

----------

## Adahma

 *cram wrote:*   

> As long as you're sure you won't need to go back to that kernel, then sure go ahead.

 

I've just realized I've got an very large chunk of my drive taken up with kernel installs.  Time for some cleanup.  If I delete the directory trees for the ones I don't need around any more, do I also need to run any kind of command to cleanup portage?

----------

## codergeek42

 *Adahma wrote:*   

> If I delete the directory trees for the ones I don't need around any more, do I also need to run any kind of command to cleanup portage?

 If you installed the kernel sources via Portage, you should also uninstall them via Portage with emerge -C after you've cleaned out the directories, just so Portage knows you don't have it installed anymore.

/my $0.02

----------

## NeddySeagoon

Adahma,.

You can also remove their modules from /lib/modules.

----------

## Adahma

 *codergeek42 wrote:*   

>  *Adahma wrote:*   If I delete the directory trees for the ones I don't need around any more, do I also need to run any kind of command to cleanup portage? If you installed the kernel sources via Portage, you should also uninstall them via Portage with emerge -C after you've cleaned out the directories, just so Portage knows you don't have it installed anymore.
> 
> /my $0.02

 

DOH!  I already deleted the directories, and can't figure out the swith to get emerge to tell me which ones it "thinks" I have installed.  How do I know which ones are installed?

----------

## Adahma

 *codergeek42 wrote:*   

>  *Adahma wrote:*   If you installed the kernel sources via Portage, you should also uninstall them via Portage with emerge -C after you've cleaned out the directories, just so Portage knows you don't have it installed anymore. 
> 
> DOH!  I already deleted the directories, and can't figure out the swith to get emerge to tell me which ones it "thinks" I have installed.  How do I know which ones are installed?

 

Figured it out, and thought I'd add it back here in case it helped anyone else...  

qpkg -I -v gentoo-dev-sources

----------

## wesw02

thanx for the help you guys rock

----------

