Solved Ezjail and major host upgrades

I just upgraded my 9.3 to 10.1 and I noticed that the basejail of my ezjail's jails still contains binaries and libs from 9.3; for example /usr/jails/basejail/usr/bin/gcc.

I upgraded the computer by compiling from source and upgraded the jails with ezjail-admin update -i

Is there a way to remove old binaries and libs or do I need to entirely rebuild basejail?
 
I'm not familiar with sysutils/ezjail but the canonical way to get rid of the old files after upgrades is this invocation:

make -C /usr/src delete-old delete-old-libs DESTDIR=/path/to/jailroot

Check if ezjail has builtin support for the same functionality or run the command directly in /usr/src of the host.
 
You may want to add -DBATCH_DELETE_OLD_FILES to that command. Or else it's going to ask if it's ok to remove every file.
 
For reference, using binary updates this is from my notes on what I have done in the past. It may not be directly useful but could come in handy for anyone looking at this thread in the future.

The jails can be updated anytime after upgrading the host. Archive original jail set.
ezjail-admin stop
ezjail-admin archive -A


Update basejail to the new release it see already via uname and give it the source release
ezjail-admin update -U -s 9.3-RELEASE-p18

Run mergemaster(8) on each jail
mergemaster -p /zfs/jails/newjail
mergemaster -UF -D /zfs/jails/newjail
mergemaster -p /zfs/jails/jail1
mergemaster -UF -D /zfs/jails/jail1 # and continue on for each jail


Start the jails.
service ezjail start

Log in to each jail and perform full upgrades on each jail for a new major release.
pkg-static upgrade -fy
 
Back
Top