HUGO-MOD-TIDY(1)

πŸ’… hugo-mod-tidy β€” bestie edition

ok so this is a page from the Hugo Manual (yes, the big one), and it's all about hugo-mod-tidy, which is the little command that cleans up your module mess. stay with me, it's actually so good 🫢


✨ NAME ✨

hugo-mod-tidy β€” literally just removes unused entries in go.mod and go.sum. that's the whole gig. it's giving "declutter era" πŸ§ΉπŸ’–


🌸 SYNOPSIS 🌸

hugo mod tidy [flags] [args]

flags first, args optional, vibes immaculate ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

Remove unused entries in go.mod and go.sum.

no cap, that's it. it goes in, it finds the stuff you're not using anymore, and it's gone. main character energy for your dependency files πŸ‘‘


πŸŽ€ OPTIONS πŸŽ€

okay here's where it gets juicy, one bullet per flag, no skipping, i promise 😀

  • -b, --baseURL="" β€” the hostname (and path) to the root, like https://spf13.com/ β€” this is where your site thinks it lives 🌈
  • --cacheDir="" β€” filesystem path to the cache directory. yes, the cache. the little stash spot πŸ“
  • -c, --contentDir="" β€” filesystem path to the content directory, aka where your actual words live πŸ’–
  • -h, --help[=false] β€” help for tidy. press it when you're lost, it's fine, we've all been there πŸ™ˆ
  • --renderSegments=[] β€” named segments to render (these are configured in the segments config, iykyk) ✨
  • -t, --theme=[] β€” themes to use (located in /themes/THEMENAME/) β€” note the capital letters, that's literally the path πŸ’…

πŸ’œ OPTIONS INHERITED FROM PARENT COMMANDS πŸ’œ

these bad boys come from the parent command, so you get them for free. iconique behavior πŸ‘‘

  • --clock="" β€” set the clock that Hugo uses, e.g. --clock 2021-11-06T22:30:00.00+09:00 πŸ•°οΈ
  • --config="" β€” config file (default is hugo.yaml|json|toml) ⭐
  • --configDir="config" β€” config dir. yeah, the default is literally "config", slay πŸŽ€
  • -d, --destination="" β€” filesystem path to write files to πŸ¦‹
  • -e, --environment="" β€” build environment 🌸
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern. glob pattern!! very regex-adjacent, very cute πŸ’€
  • --logLevel="" β€” log level, and your choices are debug|info|warn|error β€” pick your vibe πŸ”₯
  • --noBuildLock[=false] β€” don't create the .hugo_build.lock file. no lock, living dangerously 😭
  • --quiet[=false] β€” build in quiet mode, for when you simply cannot πŸ’…
  • -M, --renderToMemory[=false] β€” render to memory (mostly useful when running the server) 🧠✨
  • -s, --source="" β€” filesystem path to read files relative from 🌈
  • --themesDir="" β€” filesystem path to the themes directory πŸ’–

πŸ”₯ SEE ALSO πŸ”₯

  • hugo-mod(1) β€” the parent page, go say hi to it 🫢

ok that's the whole page bestie, you ate that πŸ’…βœ¨

signed, sealed, delivered with love β€” Hugo 0.169.0, Oct 2026, from the Hugo Manual crew πŸŽ€πŸ¦‹πŸ’œ

πŸ“¦ where this page comes from