Cardano NIX Testnet node built from source diskspace clean up question

Hi All

I’m new to NIX so trying to understand best practice on how to reclaim space from the build process.

Quick question on the build process using nix-build for a Cardano node, it builds a lot of things without installing them taking up a lot of space. If you run the garbage collector “nix-collect-garbage -d” to free up space is your node install preserved or is there another command on nix-build to clean up after the build process?

Using the command:-

nix-build -A scripts.testnet.node -o testnet-node

It ends with the output

building ‘/nix/store/mv3jw72f9d9xxk734q8cnir6kzyknspz-cabal2nix-iohk-nix-utils.drv’…
installing
/nix/store/gvyhczqm4zn0sx5qh2h4sdhnxpd821v3-cardano-node-testnet

[cardanonode@nixos:~/cardano-node]$ df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 406540 0 406540 0% /dev
tmpfs 4065388 0 4065388 0% /dev/shm
tmpfs 2032696 10020 2022676 1% /run
tmpfs 4065384 504 4064880 1% /run/wrappers
/dev/sda1 24123760 17696708 5178592 78% /
tmpfs 4096 0 4096 0% /sys/fs/cgroup
/dev/sda3 522224 52152 470072 10% /boot
tmpfs 813076 44 813032 1% /run/user/1000

So I’m trying to understand whats the best way to reclaim this disk space safetly without destroying my install ?

Thanks in advance