> suppose you upgrade netbsd with a major release. > What happens to the "old libraries" ? I think they are left in so > binaries continue to run. > Just the new ones are symlinked to current.
Running symlinks(8) on /usr and lib/ can cleanup the dangling symlinks. Fedora includes it in their dnf-system-upgrade process. It won't free up obsolete packages, though. Also see https://linux.die.net/man/8/symlinks and https://docs.fedoraproject.org/en-US/quick-docs/dnf-system-upgrade/. Jeff