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, likehttps://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 fortidy. 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 ishugo.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_vendorfor module paths matching the given Glob pattern. glob pattern!! very regex-adjacent, very cute π--logLevel=""β log level, and your choices aredebug|info|warn|errorβ pick your vibe π₯--noBuildLock[=false]β don't create the.hugo_build.lockfile. 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
- arch rolling: hugo 0.169.0-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms