Uninstall Anaconda from macOS Big Sur
This is a specific example of a common problem. Installers and applications that spray files and detritus all over the filesystem and rely on users to run many scripts, all changing weekly with version upgrades quickly becomes an intractable problem. You should be able to reclaim the 5 GB of space easily without worrying about some stub files and mostly empty config files.

Open the Terminal.app or iTerm2 terminal application, and then remove your entire Anaconda directory, which has a name such as anaconda2, anaconda3, or ~/opt. Enter rm -rf ~/anaconda3 to remove the directory.

If you’ve deleted the main program and the main folders (which I repeat above), I would say you’re good. Set up Time Machine so you’re backing up going forward and next time you want to install similar tool chains and environments, be sure you have a backup so you can roll back if that install gives poor results. Unless there’s a large file lying around you won’t gain anything cleaning up hundreds of files and other tools let you find folders and large files to clean them together.

In the unlikely event you have some issue caused by the leftover files, it’s less complicated and less time consuming to erase and reinstall a Mac and get your documents and apps reinstalled than it is to reconstruct what anaconda installed and surgically reverse every remnant left on the filesystem.
Worse, if you rm the wrong thing, you may delete more than you bargained for.

How can I make &#39;rm&#39; move files to the trash can?

A safer bet is to substitute open for rm and you do need to recognize -rf or any flags passed to rm and delete them. Use the command line to open the folders rather than removing them is my advice if you don’t get exactly the syntax of the commands you are copy and paste into terminal. The writer of those guides assumes you know what the commands do or you won’t blame / sue them if you make an error and delete your home folder and all your pictures and documents.