bazelbuild / bazelbuild/bazel

Bazel output roots are never cleaned

Open
#9,249 3 comments 0 reactions 0 assignees View on GitHub
not stale P3 team-OSS type: feature request
Dominant language
Java
Stars
25.8k
Forks
4.6k
Avg merge
2d 20h
Merged PRs (30d)
72

Description

### Description of the problem request:

For each workspace, there's an `output_base`. These directories are never cleaned, and so the output root can build up clutter over time.

For a reference point, the default `TMPDIR` is cleaned up by the OS after being 3 days stale. That seems way too short for Bazel, but having some sort of stale cleanup would be nice.

### Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.

Use bazel from a number of different workspaces, see that their output bases stay there.

### What operating system are you running Bazel on?

macOS

### What's the output of `bazel info release`?

release 0.28.0

Contributor guide

Open the contributing guide

Research direction

The issue names Bazel workspace output_base directories but no source files, tests, or entry points. Begin by locating the output_base lifecycle and existing cleanup behavior, then clarify a suitable stale-retention policy; done means stale output roots are removed without disrupting active workspaces.

Written by the indexing model from the issue text.

Assessment

Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.