Roland's homepage

My random knot in the Web

Cleaning up old port configurations

On FreeBSD, ports save their configuration parameters under /var/db/ports. When you de-install a port, this configuration remains behind. This is how to clean old configurations up.

For this, I will be using the all-options script from my private repository.

First, I needed to detect all the unused directories in /var/db/ports. This I did as follows

all-options | sed -n 's/# Skipping “//; s/”;.*$//p' | tr '\n' ' '

This generated a string that I could use to remove the directories.

# cd /var/db/ports
# rm -rf graphics_drm-legacy-kmod lang_python27 devel_check \
x11-drivers_xf86-video-intel textproc_highlight math_taucs \
multimedia_libva-utils www_youtube_dl net_wireshark cad_netgen \
graphics_opencv-core devel_gconf2 sysutils_polkit lang_spidermonkey52 \
cad_gmsh cad_opencascade math_vtk6 lang_python36 audio_sox \
games_quake-data games_joequake games_nehquake devel_sdl12 lang_guile3 \
multimedia_libva-vdpau-driver graphics_scrot textproc_gsed math_vtk8 \
net_wireshark-lite

For comments, please send me an e-mail.


Related articles


←  Opencascade problem Playing a sound when the battery is low  →