# Files after pkg_delete = bad port construction?



## johnblue (Jan 4, 2010)

I installed Dovecot 1.2.8 from ports and then I turned around and did a pkg_delete on it just to see what would happen.  pkg_delete was done in a snap.

Next, I wanted to see what was left behind:
	
	



```
# find / -name dovecot
/usr/ports/mail/dovecot
/var/db/ports/dovecot
/var/db/dovecot
/var/mail/dovecot
/var/run/dovecot
/etc/ssl/dovecot
```
Since all this stuff is still on the server, does this mean that the port maintainer didn't really write a good port file?


----------



## SirDice (Jan 4, 2010)

That depends on the files left behind. They could be modified config files or files that are generated when the port runs. When you pkg_delete the port it will complain about them. If you really aren't going to run the port again you can safely remove the left over files/directories.


----------



## phoenix (Jan 5, 2010)

/usr/ports/mail/dovecot is the port directory, so it should remain.

/var/db/ports/dovecot is where the OPTIONS you selected are saved, so that you don't get the OPTIONS screen the next time you install the port.

/var/mail/dovecot is the spool directory.  If any mail came in, it will still be in here, and should not be deleted by the port.

/var/db/dovecot, not sure what this is.  Depends on what's in it.

/var/run/dovecot is used to store the PID file of the running server process.  If dovecot was running when you deleted the package, there would be a file in here, so the dir can't be deleted.

Not sure what /etc/ssl/dovecot is used for.  Most likely there's a self-signed certificate in there that was generated the first time dovecot ran, which means it's a user-modified file, and should not be removed by the port.  Afterall, you'd want that to be left behind if you were doing an upgrade (delete; install) process.  

IOW, looks normal to me.


----------



## SIFE (Jan 5, 2010)

> /var/db/dovecot


i think the dir or file contnet configuration and options for Dovecot .


----------

