Files to delete after migrating FreeBSD 9 -> 10

So far every time I did a make installworld it only added files, never deleted. Only mergemaster offered to delete 3 scripts, that obviously isn't all that needs cleaned.
This is a big issue especially with the 10.0 release since quite a few major parts were removed, so now I have non-working remnants of BIND and GCC laying around and interfering with my daily activities since they reside in /usr which precedes /usr/local where I have the correct BIND and GCC.
Is there a script that can "clean up" my base system after a major migration like this?
 
I suggest you carefully check the FreeBSD handbook on updating the system again because this is a documented step in the process itself.

You'll also find all the required steps in the Makefile comment section (found in /usr/src or wherever you put the sourcecode):

Code:
#  1.  `cd /usr/src'       (or to the directory containing your source tree).
#  2.  `make buildworld'
#  3.  `make buildkernel KERNCONF=YOUR_KERNEL_HERE'     (default is GENERIC).
#  4.  `make installkernel KERNCONF=YOUR_KERNEL_HERE'   (default is GENERIC).
#       [steps 3. & 4. can be combined by using the "kernel" target]
#  5.  `reboot'        (in single user mode: boot -s from the loader prompt).
#  6.  `mergemaster -p'
#  7.  `make installworld'
#  8.  `make delete-old'
#  9.  `mergemaster'            (you may wish to use -i, along with -U or -F).
# 10.  `reboot'
# 11.  `make delete-old-libs' (in case no 3rd party program uses them anymore)
So the commands you're looking for are # make delete-old and # make delete-old-libs.
 
Thanks. There is actually a whole chapter on this subject.
I also noticed a very useful and less scary command # make check-old which is similar to # make delete-old, only it doesn't actually delete the files, it only lists them.
For example it wants to delete, among other things, /usr/lib/libstdc++.so. I think that wouldn't be prudent without rebuilding all installed ports at the same time :)
==EDIT==
It seems safe to delete /usr/lib/libstdc++.so, it is unsafe to delete /usr/lib/libstdc++.so.6.
 
rustyx said:
Thanks.
I also noticed a very useful and less scary command # make check-old which is similar to # make delete-old, only it doesn't actually delete the files, it only lists them.
For example it wants to delete, among other things, /usr/lib/libstdc++.so. I think that wouldn't be prudent without rebuilding all installed ports at the same time :)

You have to rebuild all installed ports anyway since you're upgrading to a newer major version of FreeBSD. You can safely use make delete-old delete-old-libs if you install the compatibility port misc/compat9x at the same time. This guarantees that the FreeBSD 9 specific libraries are still available for binaries that haven't yet been recompiled for FreeBSD 10.
 
Back
Top