If you accidentally corrupt the installation or configuration of a FreeBSD port, or if you just want to wipe any old installation settings away and install a fresh copy, issuing the following command in the port directory of interest:

# make && make deinstall reinstall clean

This will first uninstall (or “deinstall”, as it’s oddly called in the FreeBSD world) the broken port, then reinstall it, and then clean up any temporary files left behind by the compiler. It will not clear any flags you set during the installation procedure (assuming the port you’re trying to install had options/flags that could be set).

If you want to reset any previously specified options/flags to whatever’s used as the port’s default, issue the following command sequence:

# make rmconfig
# make && make deinstall reinstall clean

If you want to see what options are currently set or configured, issue the following command:

# make showconfig

Note: You must execute this command as root and from the specific port directory of interest (e.g., /usr/ports/net/samba35, /usr/ports/sysutils/lsof, /usr/ports/editors/vim, etc.)

Tags: ,

Comments are closed.