Solved FreeBSD 9.3 -> 10.3 Bind issues in jail


Recently I updated my server FreeBSD server to 10.3 release. I have a few jails at that server and one of them with DNS. I used to work with Bind and expected to install a fresh one to the jail, in case that Bind isn't part of the base system since 10.0 release. When I check my jail I found BIND 9.9.5 here:
$named -v
BIND 9.9.5 (Extended Support Version)
meanwhile at the host:
$ named -v
-bash: named: command not found

I completely cleaned /usr/src before I run "make buildworld" 10.3. I updated jails with "ezjail-admin update -i".

How can I replace BIND 9.9.5 with 9.9.9 and how it can be here?
Now that it's not part of the base system, the location has moved from /etc/namedb to /usr/local/etc/namedb.
For what it's worth, on bare metal, we were able to just move the files, with a bit of editing to named.conf and everything worked.
So, install from package or port and then just move your files from /etc/ to /usr/local/etc.
But I still have Bind in my jails, and it works completely! How can I remove named from my jail before installing the new one?
Your jail is probably still running FreeBSD 9.3. That's why you still have BIND there. I'm not too happy with the upgrade process of EZJail. It's usually easier (and less error-prone) to create new jails with the new version instead of trying to upgrade from one major version to another. Minor version updates are not a problem.
No, I check FreeBSD version in jail after upgrading:
# uname -a
FreeBSD 10.3-RELEASE-p17 FreeBSD 10.3-RELEASE-p17 #0 r315700: Thu Mar 23 12:16:11 EET 2017

I have the same situation on two production servers and I repeated it on my test server.
Thank you! But I have the same result in jail:
ns# freebsd-version
in host system:
X1# freebsd-version
I have never performed an upgrade of a DNS server from 9.3 to 10.X. I usually just kept the zone info and reinstalled. I am not sure why the system kept bind. If I were you, I would simply create a new jail and install from ports or packages dns/bind99
Yes, in our case, same way, we just did fresh 10.x or 11.x installs and used the configuration and zone files from the old server.
I think I solved the problem.

I completely deleted basejail, then installed new one with "ezjail-admin update -i" - after starting jails there was no Bind.

After that I installed new Bind from ports, but I had to set the proper variables in rc.conf:
because FreeBSD 10.3 still have old variables:
# cat /etc/defaults/rc.conf | grep named
named_program="/usr/sbin/named"     # Path to named, if you want a different one.
named_conf="/etc/namedb/named.conf"     # Path to the configuration file
My 10.3 does not:

root@ns1:~ # cat /etc/defaults/rc.conf | grep named
root@ns1:~ #

root@ns1:~ # cat /etc/rc.conf