microsoft / microsoft/WSL

kernel: gen_modules_vhdx.sh does not clean up its temporary scratch directory

Open
#13,910 3 comments 0 reactions 1 assignee View on GitHub

@chessturo is already working on this.

Since Dec 15, 2025.

feature
Dominant language
C++
Stars
33.7k
Forks
1.8k
Avg merge
3d 17h
Merged PRs (30d)
116

Description

In the WSL2 Kernel repo, Microsoft/scripts/gen_modules_vhdx.sh creates a temporary directory using mktemp -d but never cleans it up. This leaves ~360MB worth of extra files in /tmp, which may pile up over time.

It would be prudent to add rm -rf "$tmp_dir" to the end of the script, or trap 'rm -rf "$tmp_dir"' EXIT right after creating it with mktemp.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.