# Deleting Ports



## Poincare (Jul 18, 2009)

I installed fluxbox thinking it would be very useful but I don't seem to think so anymore. Can someone help me in deleting installed ports?


----------



## RandomSF (Jul 18, 2009)

Here's a couple ways 
	
	



```
pkg_delete pkg-name
```
 or just cd to the port directory and run 
	
	



```
make deinstall
```


----------



## phoenix (Jul 18, 2009)

*pkg_delete* is more reliable.  It uses the info stored under /var/db/pkg/portname-version.  This is the info that was stored when the port was installed, and most accurately describes what's installed and where.

*make deinstall* uses what's in the ports Makefile to determine what to delete.  However, if you have updated your ports tree since installing the original app, the info in the port directory may be different from what's actually installed on disk.  For example, you may have installed version X of the app, but the ports tree has the info for version X+3 of the app.

Use the ports tree to install and update software, but use the pkg_* tools to manipulate installed apps.


----------



## dennylin93 (Jul 18, 2009)

Sometimes there are ports that were installed as dependecies, but are no longer used. Try ports-mgmt/pkg_cutleaves. Sometimes you'll find a few ports that can be deleted.


----------

