Over the years a Mac collects backup disks: a USB drive, an old NAS share, a new one. Time Machine settings shows them, but I find the Terminal version clearer, because it also gives you the ID you need for the other tmutil commands.
tmutil destinationinfo prints every destination Time Machine is set up to use:
tmutil destinationinfo
For each one you get the Name as Finder shows it, the Kind (Local for a plugged-in disk, Network for a share), the URL for a network destination, the Mount Point if it’s mounted right now, and the ID. With more than one destination, a > marks the disk that got the most recent backup, which is a nice quick way to see where your backups have really been going. Add -X for the same in XML property list format when a script needs to read it.
The ID is the useful part. It’s what you pass to tmutil startbackup --destination to back up to one disk in particular, and it’s what you need to get rid of a destination that no longer exists, like the share on a NAS you sold:
sudo tmutil removedestination 01234567-89AB-CDEF-0123-456789ABCDEF
Copy the real ID from the output above, of course; mine here is made up.
The caveat: removedestination only removes the disk from the Time Machine configuration. It doesn’t delete the backups that are on it, so the files stay on the disk or share until you clean that up there. It needs root and Full Disk Access, which is why the command has sudo.
Further reading: tmutil man page (SS64 mirror)