cancel
Showing results for 
Search instead for 
Did you mean: 

Removing Build files

 
SOLVED
Go to solution
kenny chia
Regular Advisor

Removing Build files

Hi
I installed kernel source into a Red Hat ES 4 system..

# rpm kernel-2.6.9-34.EL.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -bp --target i686 kernel-2.6.spec

This created alot of files in /usr/src/redhat/BUILD/kernel-2.6.9
Now I have no need for the source code already.

Running # rpmbuild --clean --rmsource --rmspec kernel-2.6.spec does not seem to remove that directory and its files.

How do I cleanly remove all the files? do I just simply remove the directory? ie rm -rf /usr/src/redhat/BUILD/kernel-2.6.9


All Your Bases Are Belong To Us!
5 REPLIES
Jeeshan
Honored Contributor

Re: Removing Build files

remove like this

rpm -e kernel-2.6.9-34.EL.src.rpm
a warrior never quits
Jeeshan
Honored Contributor

Re: Removing Build files

to remove rpm use this command

rpm -e kernel-2.6.9-34.EL.src.rpm
a warrior never quits
kenny chia
Regular Advisor

Re: Removing Build files

Hi
The command does not work..

# rpm -e --test kernel-2.6.9-34.EL.src.rpm
error: package kernel-2.6.9-34.EL.src.rpm is not installed
All Your Bases Are Belong To Us!
Stuart Browne
Honored Contributor
Solution

Re: Removing Build files

You can't remove 'src' rpms using any rpm command.

Yes, you can just remove the directory and files it created:

/usr/src/redhat/BUILD/kernel-2.6.9
/usr/src/redhat/SOURCES/kernel-*
/usr/src/redhat/SPECS/kernel-2.6.spec

There might be one or two other files/directories about that you want to remove, but they are the main source of polution. If you don't do any other building on the machine, then all of the contents of the BUILD, SOURCES and SPECS directories is able to be removed (but not the directories them selves).
One long-haired git at your service...
kenny chia
Regular Advisor

Re: Removing Build files

Hi Stuart
Thanks
All Your Bases Are Belong To Us!