Flushing the Magento 2 Cache Storage
You can easily flush the cache storage of Magento 2 from the command line. Note that the following script must be executed from the Magento 2 root folder:
1 2 |
find var/* -type f -or -type d | grep -v 'session' | xargs rm -rf && \ rm -rf pub/static/* |
It deletes all content from the var subfolder excluding the.htaccess file and the var/session subfolder. Besides, the script also deletes all content from the pub/static subfolder excluding the.htaccess file.