Skip to content

A utility to obliterate the C:\ProgramData\docker directory when nothing else will work

License

Notifications You must be signed in to change notification settings

arcanericky/dockercizap

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Windows Docker Layer Zapper

A utility to obliterate the C:\ProgramData\docker directory when nothing else will work.

Build GitHub License

WARNING

Before using this utility you should read a couple of posts on the dangers of using it, including the possibility that you might "break the operating system". Instead, consider using the GUI and navigating to Settings, then Reset. Good luck.

Dependencies

This package relies on the hcsshim package for the heavy lifting. It's the Go interface for using the Windows Host Compute Service (HCS) to launch and manage Windows Containers.

Quick Start

The original documentation for using this utility assumes the desire to obliterate everything in C:\ProgramData\docker and start over. That's probably the safest route because metadata for image\ and windowsfilter\ is scattered throughout this directory structure.

If you get errors (exceptions) when executing this utility, the cleanest technique is to uninstall Docker, reboot, then run the utility with administrative privileges. I've also found that stopping the Docker Engine and Docker Desktop Service will usually eliminate these exceptions which are usually caused by the lower level hcshim package and not preventable in the code.

Execute:

.\docker-ci-zap.exe -folder "C:\ProgramData\docker"

Why?

If you've used Docker for Windows with Windows containers you've probably realized that Windows images are huge and the layers are by default packed into C:\ProgramData\Docker\image and C:\ProgramData\Docker\windowsfilter directories. Eventually you run low on disk space, notice those directories seem to be responsible, then try to remove it only to find you can't do this. Next, you attempt removal with administrator privileges only to fail yet again. This leads to ultimate sadness and in desperation you search for relief. If you're lucky you find the executable for the original docker-ci-zap project from which this repository was forked. Embedded in that repository is an executable that will save you.

Microsoft's Container Storage Overview post will start you down the rabbit hole of how all this works and also notably references how to change where these layers are stored using the docker-root configuration.

The original project hasn't been updated in years and there are no formal releases or testing. It's also tough to tell which version the hcsshim package was used for the build and the executable in the original repository shows it was lasted updated 5 years ago.

This project forks the original, adding more formal build and test steps along with a more formal release using versions. It's an attempt to make this executable more accessible and more safe. Because no one really enjoys downloading and running some random executable packed into a random repository.

About

A utility to obliterate the C:\ProgramData\docker directory when nothing else will work

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 100.0%