Docker is consuming a lot of storage of c drive. How can I prevent it?

Everytime I create a docker container, it leads to occupying a lot of storage in C drive. Due to which my laptop’s C drive is getting almost Full. I am not able to reclaim the memory. Is there anyway to prevent this from happening or to reclaim that memory?

I moved your post to the Docker Desktop for Wndows catageory. The Communiity catagory is to either share
a docker related event you plan, or ask about events.

There are plenty of posts regarding this topic, the search function should provide useful results.

Also, there are plenty of blog posts about how to shrink the vhdx files of WSL2 distributions.

@meyay Sorry for this and Thank you for your reply regarding the issue.