Fixing "tee: command not found" on Debian 11 Bullseye

I get this error whenever I try to use tee on my Debian 11 Bullseye installation:

tee: command not found

tee is part of coreutils:

Specifically, this package includes: arch base64 basename cat chcon chgrp chmod chown chroot cksum comm cp csplit cut date dd df dir dircolors dirname du echo env expand expr factor false flock fmt fold groups head hostid id install join link ln logname ls md5sum mkdir mkfifo mknod mktemp mv nice nl nohup nproc numfmt od paste pathchk pinky pr printenv printf ptx pwd readlink realpath rm rmdir runcon sha*sum seq shred sleep sort split stat stty sum sync tac tail tee test timeout touch tr true truncate tsort tty uname unexpand uniq unlink users vdir wc who whoami yes

And I have coreutils installed:

coreutils/stable,now 8.32-4+b1 amd64 [installed]

So a bit of a pain.

The solution (or, at least, a solution) was to reinstall coreutils:

sudo apt --reinstall install coreutils

And now tee is available.

(I've no idea why it was not available.)


Author: neil

I'm Neil. By day, I run a law firm, decoded.legal, giving advice on Internet, telecoms, and tech law. This is my personal blog, so will be mostly about tech stuff, cycling, and other hobbies.

You can find me (and follow me) on Mastodon and Twitter.