gc(1)

πŸ“¦ version 0.8.0, in nixpkgs unstable

πŸ’… gc(1) β€” like, the garbage collection one, bestie πŸ—‘οΈβœ¨

okay so real talk, this is a page from the General Commands Manual and it's about gc. short, sweet, and honestly? iconic. it's the glow-up your nix store has been begging for 🫢


🌸 NAME 🌸

gc β€” run garbage collection. yep. that's it. it's literally short for nix-store --gc, no cap πŸ’…


✨ SYNOPSIS ✨

gc [-n|--non-interactive] [-i|--interactive] [-b|--bigger] [-q|--quota]
[-d|--dry-run] [-m|--modest] [-h|--help]

look at all those flags. she's got options, she's got range, she's a main character πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

run garbage collection (short for nix-store --gc).

that's the whole vibe. your store gets cleaned, the clutter goes bye-bye, and honestly? she ate πŸ”₯


πŸŽ€ OPTIONS πŸŽ€

  • -n, --non-interactive β€” do not ask before running garbage collection. she just goes. no questions, no small talk, straight to business πŸ’€
  • -i, --interactive β€” ask before running garbage collection. consent era fr fr, she checks in with you first πŸ™ˆ
  • -b, --bigger <BIGGER> β€” only perform gc if the store is bigger than BIGGER Gibibytes. like, if it's not that thicc, she's not bothering 😌
  • -q, --quota <QUOTA> β€” only perform gc if the store uses more than QUOTA% of its device. percentage-based boundaries, very reasonable, we love to see it ⭐
  • -d, --dry-run β€” don't actually run garbage collection. it's giving window shopping. preview mode only, nothing gets deleted, you're safe bestie 🧚
  • -m, --modest β€” collect just as much garbage as to match --bigger or --quota. she's not greedy, she's modest, it's in the name πŸ’–

the desired target size of the store is calculated based on --bigger or --quota and then rewritten to match the --max-freed option of nix-store(1). garbage collection is then performed stopping, as soon as the desired target size is met. like a little diet instead of a full reset β€” precise, intentional, lowkey genius 🌸

  • -h, --help β€” print help (see a summary with '-h'). honestly the friendliest flag in the game, she's always there for you 😭

ok tiny heads-up before you go: -m/--modest is the one where the target size gets calculated from --bigger or --quota and rewritten to match --max-freed in nix-store(1), and gc stops as soon as that target is met. that's not me making stuff up, that's literally what the page says, so don't come for me πŸ’€

and that's the whole page, bestie β€” gc from the General Commands Manual, footer vibes: gc, gc(1). she's short, she's efficient, she's the moment. periodt πŸ’œβœ¨

πŸ“¦ where this page comes from