Torch generally seems to create directories with prefix torch_shm_ under /dev or /dev/shm. I work on a gcp compute environment so restarting the environment generally takes care of the temp files, maybe restarting your local machine could offer a solution.
Word of caution rm -rf torch* while use /dev doesn't really work and is dangerous if one accidentally puts a space between torch and *.