Deleting enrolled fingerprints

New Contributor III

So I want to run this on all machines that were using TouchID to unlock their machines. I have disabled unlocking machines via TouchID, but is it worth the effort to delete TouchID for machines already enrolled?

Here's the dilemma of what I want to run.

sudo bioutil -d <UID of current logged in user>
You are about to irreversibly delete all system fingerprints. Do you want to proceed (Y/N)?

I get the prompt for Y/N. How can I work this into a script? This is what I have so far:

loggedInUser=$(/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }')
uidUser=$(id -u $loggedInUser)
bioutil -d $uidUser;

Am I wasting cycles trying to delete enrolled fingerprints if I've blocked being able to unlock already?