Uninstalling and Reinstalling


One nice thing about the tight integration between ports and packages is that you get all the advantages and flexibility of installing via source, but the package-handling tools work perfectly. You can uninstall a port with pkg_delete(1) and learn about it with pkg_info(1). Because the port's installation is recorded under /var/db/pkg/, you can go through the contents file.

You could also uninstall a port from the ports directory with the "make deinstall" target. For example, you might find that you want to experiment with several different versions of the Snort port before finally settling on one you like. You'll need to specify the flavor you want to uninstall in the environment, or the port will not be able to find the installed package you want to uninstall. For example, if I wanted to switch my Snort setup from a Postgresql database over to a MySQL database, I could do this:

 # env FLAVOR="postgresql smbalert flexresp" make deinstall # env FLAVOR="mysql smbalert flexresp" make install 

This would also leave me with two different flavors of the port in /usr/ports/ packages/i386, so I could switch back and forth easily.




Absolute Openbsd(c) Unix for the Practical Paranoid
Absolute OpenBSD: Unix for the Practical Paranoid
ISBN: 1886411999
EAN: 2147483647
Year: 2005
Pages: 298

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net