Title: Clearing generated files
Last modified: February 7, 2018

---

# Clearing generated files

 *  Resolved [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/)
 * (@liammcarthur)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/clearing-generated-files/)
 * I’ve noticed that the folder that stores all of the generated `.js` and `.js.
   gz` is now getting very large and contains hundreds of files. I’ve tried using
   the clear cache option in the troubleshooting section but that doesn’t seem to
   do anything. Is there a safe way to clear the number of files in this folder?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fclearing-generated-files%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Denis Ryabov](https://wordpress.org/support/users/dryabov/)
 * (@dryabov)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/clearing-generated-files/#post-9963777)
 * It’s necessary to clear `s` directory together with `wp-content/plugins/psn-pagespeed-
   ninja/ress/cache` (and `wp-content/plugins/psn-pagespeed-ninja/cache` if server-
   side page caching is enabled).
 * Usually, many files are generated in the case of dynamically inserted `<script
   >` or `<style>` tags that vary from page to page, and it is recommended to disable“
   Merge embedded styles” and “Merge embedded scripts” options to exclude them from
   merging.
 *  Thread Starter [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/)
 * (@liammcarthur)
 * [8 years, 4 months ago](https://wordpress.org/support/topic/clearing-generated-files/#post-9968706)
 * I’ll give it a go. Many thanks!
    -  This reply was modified 8 years, 4 months ago by [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/).

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Clearing generated files’ is closed to new replies.

 * ![](https://ps.w.org/psn-pagespeed-ninja/assets/icon.svg?rev=1722219)
 * [PageSpeed Ninja - Cache, Minify, Defer CSS JavaScript, Critical CSS, Optimize Images, Convert WebP](https://wordpress.org/plugins/psn-pagespeed-ninja/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/psn-pagespeed-ninja/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/psn-pagespeed-ninja/)
 * [Active Topics](https://wordpress.org/support/plugin/psn-pagespeed-ninja/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/psn-pagespeed-ninja/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/psn-pagespeed-ninja/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [LiamMcArthur](https://wordpress.org/support/users/liammcarthur/)
 * Last activity: [8 years, 4 months ago](https://wordpress.org/support/topic/clearing-generated-files/#post-9968706)
 * Status: resolved