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

🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 14 comments so far... add one

CategoryList of Unix and Linux commands
Disk space analyzersncdu pydf
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network UtilitiesNetHogs dig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
14 comments… add one
  • BOK Feb 27, 2008 @ 13:55

    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”.

  • 🐧 nixCraft Feb 27, 2008 @ 16:01


    man ports has all info.

  • robot Aug 26, 2008 @ 17:48


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


  • kingwah Feb 6, 2009 @ 8:39

    Big thanks to you!
    Really solving my problem!!

  • BoogieBoy Mar 6, 2009 @ 10:14

    Thank you for this tip. Helped alot ;)

  • mfccmf May 16, 2009 @ 3:46

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

    • neubian Aug 28, 2012 @ 22:50

      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.

  • jjmoreno23 Jun 10, 2009 @ 13:23

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

  • Nitromaroder Jun 10, 2009 @ 19:04

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

    — regards,

  • 🐧 nixCraft Jun 10, 2009 @ 20:26

    Thanks for the heads-up!

  • Just wondered the same Dec 1, 2009 @ 15:29

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

  • Just wondered the same Dec 1, 2009 @ 15:30

    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

  • Alan Jan 29, 2010 @ 11:19

    Thank you! This tip help-me a lot!


  • andl Jul 26, 2013 @ 8:20

    Many thanks for advise from n00b!

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Still have questions? Post it on our forum