To remove multiple volumes, create a text file with the names or IDs of the volumes and use the command xargs docker volume rm < volumes.txt.