Cleanup old unused werf cache and data of all projects on host machine.

The data include:

  • Lost docker containers and images from interrupted builds.
  • Old service tmp dirs, which werf creates during every build, converge and other commands.
  • Local cache:
    • Remote git clones cache.
    • Git worktree cache.

It is safe to run this command periodically by automated cleanup job in parallel with other werf
commands such as build, converge and cleanup.


werf host cleanup [options]


            Enable developer mode (default $WERF_DEV)
            Specify docker config directory path. Default $WERF_DOCKER_CONFIG or $DOCKER_CONFIG or  
            ~/.docker (in the order of priority)
            Indicate what the command would do without actually doing that (default $WERF_DRY_RUN)
            Use specified dir to store werf cache files and dirs (default $WERF_HOME or ~/.werf)
            Set log color mode.
            Supported on, off and auto (based on the stdout’s file descriptor referring to a        
            terminal) modes.
            Default $WERF_LOG_COLOR_MODE or auto mode.
            Enable debug (default $WERF_LOG_DEBUG).
            Enable emojis, auto line wrapping and log process border (default $WERF_LOG_PRETTY or   
            Disable explanatory output (default $WERF_LOG_QUIET).
            Set log terminal width.
            Defaults to:
            * interactive terminal width or 140
            Enable verbose output (default $WERF_LOG_VERBOSE).
            Loose werf giterminism mode restrictions (NOTE: not all restrictions can be removed,    
            more info, default   
            Use specified dir to store tmp files and dirs (default $WERF_TMP_DIR or system tmp dir)