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. Then look in /usr/local. See if anything is leftover that shouldn't be there. Look in /etc and /var/db/pkg and .... But I think that what you might want to do is a fresh install. dump is a bit slow and will probably carry over some cruft. I tar all of the pieces regularly. tar ... /etc tar ... /root tar ... /home etc. Then you have copies of the new and old files to work with. tar xzf .. into another place such as home. compare new and old files in the necessary places and you are good. Sometimes you just have to do tedious. upgrade vs install does not give you the same system. I almost never do a fresh install, but every once in a while, it's a good choice. Hope this is helpful. Others may give different or better advice. sysupgrade is a tool of convenience. I like it, but never had any problems doing things manually. Useful advice: Learn to use ed. It will save your butt during disasters! Chris Bennett > Or maybe, I should dump, do a complete reinstall, pkg_add -l mypkg, > restore /home and, tediously, restore some /etc files. > How would you do this? > -- > Manuel Giraud >

