Clean static files cache

You can clean generated static view files in any of the following ways:

  • In the Magento Admin. Go to System > Tools > Cache Management and click Flush Static Files Cache.

    This option is only availble in developer mode. Refer to the static view files overview for more information.

  • Manually by clearing the pub/static and var/view_preprocessed directories and subdirectories except for pub/static/.htaccess.

    To clear the pub/static directory of all files except .htaccess (which is a hidden file), enter the following command:

    rm -R pub/static/*
    
  • Several commands support an optional parameter --clear-static-content, which cleans generated static view files: