# Deleting a package without deleting those that depend on it



## JackD (Oct 23, 2015)

Hi,
  I'm trying to upgrade smokeping and I get the error:

```
===>>> The dependency for www/p5-CGI
  seems to be handled by p5-CGI.pm-3.63_1,1

[...]

===>  p5-CGI-4.22 conflicts with installed package(s):
  p5-CGI.pm-3.63_1,1

  They will not build together.
  Please remove them first with pkg delete.
*** Error code 1
```

My thought on this was that I should be able to `pkg delete p5-CGI.pm-3.63_1,1`, however, it wants to delete smokeping as well.  While I am tempted to allow it and then re-install p5-CGI and smokeping, I have historical data I don't want to lose. 

So I would either like to delete _only _p5-CGI.pm-3.63_1,1 and I can't figure out how to do that.  Or perhaps there is a different way to resolve this?


----------



## phoenix (Oct 23, 2015)

Copy your historical somewhere else, then do the pkg delete/pkg install?
Really, pkg delete should not delete user data, but do the copy anyway, just to be safe.


----------



## talsamon (Oct 24, 2015)

`pkg delete -f packagename` deletes only the one package you want.


----------

