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.

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

  • Using the Magento command line.

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

    rm -R pub/static/*