Skip to content
systemcoding.dev
Embedded Linux

Clean the build output but keep downloads with make clean

make clean deletes everything Buildroot built but leaves the dl/ directory and your .config, so a rebuild needs no downloads, on 2025.02.

1 min read
Summarize in AI

After a toolchain or configuration change you often want a rebuild from scratch, but not another 2 GB of source downloads. make clean removes output/build, host, staging, target and images, and does not touch the download directory or .config. This was written for Buildroot 2025.02 LTS.

Shell
make clean
ls output
ls dl | head -3
Text
build  host  images  staging  target
busybox-1.37.0.tar.bz2
dropbear-2024.86.tar.bz2
linux-6.12.12.tar.gz

The first listing shows the directories recreated empty by the next build. make distclean goes further and removes .config too, so keep a defconfig first with make savedefconfig. When the download directory is set outside the tree with BR2_DL_DIR, clean is even safer. A clean build ignores any changed package that is not rebuilt automatically, which is the reason to use it. File names above are examples.

Also inToolchains
Taggedbuildroot
Share

More snippets

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.