E
E
EvgMul2020-12-07 15:42:12
Docker
EvgMul, 2020-12-07 15:42:12

Why is the docker command returning an error?

I need to delete all volumes. I do the following: docker volume rm $(docker volume ls -q)
As a result, I see an error:

unknown shorthand flag: 'q' in -q)
See 'docker volume rm --help'.


What am I doing wrong? Googled, like the command is correct, individually performed perfectly. What am I missing?
Thanks in advance to all who respond.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
EvgMul, 2020-12-09
@EvgMul

The problem was in the console. Windows cmd.exe returns an error. Maybe the dollar sign is a specific bash shell command.

V
Vladimir Kuts, 2020-12-07
@fox_12

What if you do something like this?
docker volume ls -q | xargs docker volume rm

V
Vitaly Karasik, 2020-12-07
@vitaly_il1

Works for me.
See what gives

docker volume ls -q

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question