On 2020-11-25, Chris Bennett <cpb_m...@bennettconstruction.us> wrote: > On Wed, Nov 25, 2020 at 02:26:42PM +0100, Manuel Giraud wrote: >> Hi, >> >> I'd like to upgrade (on -current) and, in the process, remove some cruft >> accumulated over the years. I usually do sysupgrade and sysclean for >> system. >> >> But for packages, I think I would be better to reinstall everything >> since "pkg_check -F" does not seems to complain and I can see I have, >> for example, some firefox-57 files left. >> >> I think I could do the following but I don't know if it is safe: >> - sysupgrade (+ sysclean) >> - pkg_info -mz > mypkg >> - umount /usr/local >> - newfs partition_of_usr_local >> - mount /usr/local >> - pkg_add -l mypkg >> > > It's not right. Use pkg_delete -cX first. There are package files in > many other places that need to go away.
Be very careful with -c! It may remove configuration files that you actually want to keep.