Forrest logo
back to the hexo tool

hexo:tldr:01f4b

hexo: Clean the cache file (`db.json`) and generated files (`public/`).
$ hexo clean
try on your machine

The command "hexo clean" is used in the Hexo framework, which is a static site generator. This command is used to clean the previously generated or cached files and directories created by Hexo during the site generation process.

When you run "hexo clean", it deletes the following directories:

  • The public directory: This directory contains the generated HTML files, stylesheets, JavaScript files, and other assets for your website.
  • The .cache directory: This directory stores the cache files generated by Hexo.

By running this command, you are essentially removing all the previously generated files and starting with a clean slate. This is useful when you want to ensure that there are no remnants of old files or caching issues affecting the generation of your website. After running "hexo clean", you typically follow it up with the "hexo generate" command to create a fresh set of files.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the hexo tool