Remove sudoers using script
For what it's worth, you can use

printf '/^%%admin ALL = (ALL) ALL$/d\nw\nq\n' | ed -s sudoers


or, if you want to catch the line independent of the number of space characters, tabs etc used

printf '/^%%admin[[:blank:]]*ALL[[:blank:]]*=[[:blank:]]*(ALL)[[:blank:]]*ALL$/d\nw\nq\n' | ed sudoers 


in bash to remove the admin line (the double %% are required to prevent printf from interpreting them as formatting instructions).

The usual caveats about editing sudoers without relying on the syntax checks done by visudo apply. So it might be safer to run the following, or at least have another root shell running so you can fix any issues without getting locked out)

cp /etc/sudoers /tmp
chmod +w /tmp/sudoers
printf '/^%%admin[[:blank:]]*ALL[[:blank:]]*=[[:blank:]]*(ALL)[[:blank:]]*ALL$/d\nw\nq\n' \
    | ed /tmp/sudoers
if visudo -c -f /tmp/sudoers; then
    echo "All well"
    mv -f /tmp/sudoers /etc/sudoers
    chmod -w /etc/sudoers
else
    echo "Uups, something went wrong"
fi


(Script untested, because I don't want to mess with my sudoers file)