When you create the list by running /scripts/autorepair unmanaged_zones it adds the list of zones to a file... /etc/unmanaged_zones - then it generates a script... /scripts/unmanaged_zones specifically for that file.
You have to delete idividually from the /etc/unmanaged_zones file the zones you no longer want on the server - or empty the file completely. Then run /scripts/unmanaged_zones and it will remove the zones for you. If you want to start again, you must delete both /etc/unmanaged_zones and /scripts/unmanaged_zones then run /scripts/autorepair unmanaged_zones again.
I want to do this on all my servers but unfortunately when I try to run the script I get this...
# /scripts/unmanaged_zones
Bareword found where operator expected at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 30, near "m/^(?:\d+|-1)$/a"
syntax error at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 30, near "m/^(?:\d+|-1)$/a "
syntax error at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 34, near "else"
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 35.
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 35.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 38.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 38.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 38.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 39.
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 39.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 41.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 42.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 42.
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 45.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 46.
Global symbol "@files" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 50.
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 65.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 65.
Global symbol "$uid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 66.
Global symbol "$gid" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 66.
Global symbol "$count" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 69.
Global symbol "$count" requires explicit package name at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 72.
syntax error at /usr/local/cpanel/Cpanel/SafetyBits/Chown.pm line 73, near "}"
/usr/local/cpanel/Cpanel/SafetyBits/Chown.pm has too many errors.
Compilation failed in require at /usr/local/cpanel/Cpanel/SafetyBits.pm line 14.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/SafetyBits.pm line 14.
Compilation failed in require at /usr/local/cpanel/Cpanel/DNSLib.pm line 18.
BEGIN failed--compilation aborted at /usr/local/cpanel/Cpanel/DNSLib.pm line 18.
Compilation failed in require at /scripts/unmanaged_zones line 10.