removing old kernel source?

Matthew Saltzman mjs at
Fri Jun 3 13:35:56 UTC 2005

On Thu, 2 Jun 2005, Christopher J. Bottaro wrote:

> Hi,
> I'm using FC3 and I installed the kernel source using these steps:
> rpm -Uvh`uname
> -r`.src.rpm
> cd /usr/src/redhat/SPECS
> rpmbuild -bp --target=`uname -m` kernel-2.6.spec
> I did all that with kernel-2.6.11-1.14_FC3 and it put the kernel source
> in /usr/src/redhat/build/kernel-2.6.11.
> Now Red Hat released kernel-2.6.11-1.27_FC3 and I want to rebuild my kernel
> again, but I'm afraid its going to put the source
> in /usr/src/redhat/build/kernel-2.6.11 again, mixing with the old source I
> built.
> How do I get rid of the old source or make the new source be put in a
> different place?

If I'm not mistaken, SRPMs unpack into /usr/src/redhat/SOURCES/.  But 
they don't make intries in the RPM database, so you just have to remove 
the directory before reinstalling.

 	 rm -rf /usr/src/redhat/SOURCES/kernel-2.6.11

Also, you are better off setting up RPM so that you do builds in your user 
account rather than as root.  There are various places where you ana find 
out how to do this.  See the JPackage Website ( or 
Michael Fratoni's rpm_enviroment scripts 
( for example.

> Thanks for the help,
> -- C

 		Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu

More information about the users mailing list