# Regenerate existing previews with new dimensions

**URL:** <https://help.nextcloud.com/t/regenerate-existing-previews-with-new-dimensions/130503>\
**Category:** ℹ️ Support\
**Tags:** preview\
**Created:** [January 4, 2022, 10:28pm UTC](https://help.nextcloud.com/t/regenerate-existing-previews-with-new-dimensions/130503 "2022-01-04T22:28:51Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![gas85](https://help.nextcloud.com/user_avatar/help.nextcloud.com/gas85/32/7772_2.png) [@gas85](https://help.nextcloud.com/u/gas85)\
**Post date:** [January 5, 2022, 2:13pm UTC](https://help.nextcloud.com/t/regenerate-existing-previews-with-new-dimensions/130503/3 "2022-01-05T14:13:47Z")

</div>

You do not need to write any script. Simply:

> [@How to clean up nextcloud-data/appdata\_\* and /updater-\*](https://help.nextcloud.com/t/how-to-clean-up-nextcloud-data-appdata-and-updater/123746/7):
>
> #### To “reset” the preview cache
> 
> 1. Stop Webserver (apache / nginx)
> 2. Moved the appdata\_instaceName/preview folder outside the appdata folder. You can just remove it if you are confident.
> 3. Run `sudo -u www-data /usr/bin/php /var/www/nextcloud/occ files:scan-app-data` to fix database
> 4. Start Webserver and Test everything works
> 5. Finish up (delete moved folder, etc).
> 6. Run pregenerate command afterwards.

---

_[View the full topic](https://help.nextcloud.com/t/regenerate-existing-previews-with-new-dimensions/130503)._
