rm: remove write-protected directory '/var/lib/docker'?

Question: What is this error all about? "rm: remove write-protected directory '/var/lib/docker'?" when I tried to remove /var/lib/docker with command below:

sudo rm -R /var/lib/docker

Login to See the Rest of the Answer

use the following command to force the directory to be removed,
sudo rm -rf /var/lib/dokcer

This should do it. Keep in mind that "r" is for "recursive", it will iterate through the files and remove them and "f" stands for "force" which will force the command to run.

[Note]: It is always not a good idea to force command, the error is telling you something that you have to pay attention to, before your force the command be aware what you might be losing.

The error is not your enemy but your best friend.

Hope this helps.

@Jerry said:

You are welcome.

Posted On: December 04, 2021 14:50:28 PM
Jerry said:

Thank you this helped me.

Posted On: December 04, 2021 14:48:29 PM

© 2024 - ErnesTech - Privacy
E-Commerce Return Policy