Docker Community Forums

Share and learn in the Docker community.

Can't remove a network volume


(Jof300) #1

Hi,

I have got a problem when I want to remove a network (glusterfs) volume.

[root@swarm01 srv]# docker volume ls
DRIVER              VOLUME NAME
glusterfs:latest    fixmystreet-dck-dev/
[root@swarm01 srv]# docker volume rm fixmystreet-dck-dev/
Error: No such volume: fixmystreet-dck-dev/
[root@swarm01 srv]# docker volume rm "fixmystreet-dck-dev/"
Error: No such volume: fixmystreet-dck-dev/
[root@swarm01 srv]# docker volume inspect fixmystreet-dck-dev/
[]
Error: No such volume: fixmystreet-dck-dev/

Any Idea ?

Regards


(Martin Terp) #2

I have some more you can try:

docker volume rm fixmystreet-dck-dev\/
docker volume rm “fixmystreet-dck-dev\/”


(Jof300) #3

Hello,

I tried but it doesn’t work

[root@swarm01 srv]# docker volume rm fixmystreet-dck-dev/
Error: No such volume: fixmystreet-dck-dev/
[root@swarm01 srv]# docker volume rm "fixmystreet-dck-dev/"
Error: No such volume: fixmystreet-dck-dev/

It seems the “/” et the end of the volume name is causing this issue.

Regards


(Martin Terp) #4

I can see that the system edited my response, please check my answer again, i have edited it :slight_smile:


(Jof300) #5

Still the same :frowning:

[root@swarm01 srv]# docker volume rm fixmystreet-dck-dev\/
Error: No such volume: fixmystreet-dck-dev/
[root@swarm01 srv]# docker volume rm "fixmystreet-dck-dev\/"
Error: No such volume: fixmystreet-dck-dev\/

(Rupeshrams) #6

Try these

docker system prune

This will remove the stopped containers and networks which is not used for any containers.


(Goffinf) #7

You should really include a warning before advising people to use system prune, since you may ‘prune’ a bit more than you expected. Better to use something a bit more targeted unless you really don’t care ?


(Rupeshrams) #8

It mentioned clearly that it will remove the unused and from the docker ,

prune Remove all unused volumes

If you really need more concern you can try docker volume --help that will indicate more information.