HUGO-MOD-CLEAN(1)

πŸ’… HUGO-MOD-CLEAN πŸ’…

okay so this is the hugo-mod-clean page from the Hugo manual, and yes bestie it's a whole moment. it's the one that goes in and deletes stuff, so read the whole thing before you start yeeting caches, mkay? 🫢


✨ NAME ✨

hugo-mod-clean β€” Delete the Hugo Module cache for the current project

like literally that's the whole job. it cleans. it's giving janitor energy and honestly? iconic. 🧹


🌸 SYNOPSIS 🌸

hugo mod clean [flags] [args]

flags, args, whatever order your heart desires (well, within reason β€” flags then args is the vibe). πŸ’–


πŸ¦‹ DESCRIPTION πŸ¦‹

Delete the Hugo Module cache for the current project.

that's it. that's the function. it goes in, it nukes the module cache for the project you're standing in, and it does not ask questions. no cap. πŸ”₯

ngl bestie, "delete the cache" is the entire description, so if you were hoping for a long lore drop about what the cache *is*… the manpage is not giving that. the manpage is giving minimal. respect. πŸ’…

πŸŽ€ OPTIONS πŸŽ€

  • --all[=false] β€” clean the entire module cache. the whole thing. not just the current project's little corner. default is false, so you gotta opt into the chaos. πŸ’€
  • -b, --baseURL="" β€” the hostname (and path) to the root, e.g. https://spf13.com/. defaults to empty.
  • --cacheDir="" β€” filesystem path to the cache directory. defaults to empty.
  • -c, --contentDir="" β€” filesystem path to the content directory. defaults to empty.
  • -h, --help[=false] β€” help for clean. your emotional support flag. 🫢
  • --pattern="" β€” pattern matching module paths to clean, and if it's not set it cleans all of them. e.g. "*hugo". defaults to empty. πŸ“
  • --renderSegments=[] β€” named segments to render, configured in the segments config. defaults to an empty list.
  • -t, --theme=[] β€” themes to use, located in /themes/THEMENAME/. defaults to an empty list.

🌈 OPTIONS INHERITED FROM PARENT COMMANDS 🌈

these aren't even clean's own flags, they're the ones it inherited from the parent hugo command like a hand-me-down hoodie. still cute, still useful, still here. ✨

  • --clock="" β€” set the clock used by Hugo, e.g. --clock 2021-11-06T22:30:00.00+09:00. defaults to empty.
  • --config="" β€” config file. default is hugo.yaml|json|toml.
  • --configDir="config" β€” config dir. defaults to "config".
  • -d, --destination="" β€” filesystem path to write files to. defaults to empty.
  • -e, --environment="" β€” build environment. defaults to empty.
  • --ignoreVendorPaths="" β€” ignores any _vendor for module paths matching the given Glob pattern. defaults to empty.
  • --logLevel="" β€” log level, one of debug|info|warn|error. defaults to empty.
  • --noBuildLock[=false] β€” don't create the .hugo_build.lock file. defaults to false.
  • --quiet[=false] β€” build in quiet mode. defaults to false.
  • -M, --renderToMemory[=false] β€” render to memory, which is mostly useful when running the server. defaults to false.
  • -s, --source="" β€” filesystem path to read files relative from. defaults to empty.
  • --themesDir="" β€” filesystem path to themes directory. defaults to empty.

πŸ‘‘ SEE ALSO πŸ‘‘

  • hugo-mod(1) β€” the parent command, go say hi πŸ’œ

and that's the page, bestie! go forth and clean responsibly β€” this thing deletes caches for real, so maybe double-check that --all before you commit, iykyk 😭

Hugo 0.169.0 Β· Oct 2026 Β· HUGO-MOD-CLEAN(1) β€” mwah, that's the version and date, logged off with love πŸŽ€πŸ’–

πŸ“¦ where this page comes from