Reconfiguring FreeBSD Ports – Remove OPTIONS config For Any Port

by on February 27, 2008 · 14 comments· LAST UPDATED June 10, 2009

in , ,

While building Apache port I was presented with a menu from which I selected certain build options. However, certain option giving out error as follows:
===> apache-2.2.8 mod_mem_cache requires WITH_THREADS.
*** Error code 1

All I wanted to do is disable mod_mem_cache and build Apache again. Unfortunately, it is not allowing me to clear out configuration option. How do I remove all selected options and allow me to start over again?

There are many ways to clear out configuration options under FreeBSD. make command offers various options to revisit CONFIG menu to add, remove, or change options after a port has been built.

make rmconfig option

The simplest one is type command make rmconfig. First login as root; go into the directory containing the port and type:
# cd /usr/ports/www/apache22
# make rmconfig


===> Removing user-configured options for apache-2.2.8

Use 'make config' to modify settings

Another option is type make config.
# make config
# make install clean

To display OPTIONS config for port, enter:
# make showconfig
See the man page ports for more information:
$ man ports

Tweet itFacebook itG+ itDownload PDF versionFound an error/typo on this page?

{ 14 comments… read them below or add one }

1 BOK February 27, 2008 at 1:55 pm

Thanks! I still find it hard to find the right documentation on how to use these ports-commands on FreeBSD…
Can’t remember I ever heard of “rmconfig”.


2 nixCraft February 27, 2008 at 4:01 pm


man ports has all info.


3 robot August 26, 2008 at 5:48 pm


This has solved my problem with apache giving me hell about openldap! Just took out that option and it compiled cleanly!



4 kingwah February 6, 2009 at 8:39 am

Big thanks to you!
Really solving my problem!!


5 BoogieBoy March 6, 2009 at 10:14 am

Thank you for this tip. Helped alot ;)


6 mfccmf May 16, 2009 at 3:46 am

is there a way to do make rm config for the whole ports tree?


7 neubian August 28, 2012 at 10:50 pm

Installed port options are located in a file called “options” in the directory named /var/db/ports/”portname”.

To remove an individual ports options remove that ports directory
ex: # rm -rf /var/db/ports/apache22

To remove all the ports options then remove all the sub-directories.


8 jjmoreno23 June 10, 2009 at 1:23 pm

thanks a lot for this tip, i have problems compiling gpg and this tip save me a lot of time


9 Nitromaroder June 10, 2009 at 7:04 pm

Thanks for the info – btw., you have a typo – it’s not ‘make ports’ but ‘man ports’.

— regards,


10 nixCraft June 10, 2009 at 8:26 pm

Thanks for the heads-up!


11 Just wondered the same December 1, 2009 at 3:29 pm

find . -type d -iname ‘p5-*’ | while read d ; do pushd . ; cd $d ; make rmconfig ; popd ; done


12 Just wondered the same December 1, 2009 at 3:30 pm

To remove configuration from all subdirectories, beginning with ‘p5-‘

find . -type d -iname ‘p5-*’ | while read d ; do pushd . ; cd $d ; make rmconfig ; popd ; done


13 Alan January 29, 2010 at 11:19 am

Thank you! This tip help-me a lot!



14 andl July 26, 2013 at 8:20 am

Many thanks for advise from n00b!


Leave a Comment

Tagged as: , , , , , , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: