# Remove preview files without occ and without posix

**URL:** <https://help.nextcloud.com/t/remove-preview-files-without-occ-and-without-posix/31634>\
**Category:** ℹ️ Support\
**Tags:** nc12\
**Created:** [May 13, 2018, 11:16am UTC](https://help.nextcloud.com/t/remove-preview-files-without-occ-and-without-posix/31634 "2018-05-13T11:16:29Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![Stijn\_Haezebrouck](https://help.nextcloud.com/user_avatar/help.nextcloud.com/stijn_haezebrouck/32/3822_2.png) [@Stijn\_Haezebrouck](https://help.nextcloud.com/u/Stijn_Haezebrouck)\
**Post date:** [May 13, 2018, 1:50pm UTC](https://help.nextcloud.com/t/remove-preview-files-without-occ-and-without-posix/31634/3 "2018-05-13T13:50:20Z")

</div>

I have done the following procedure with success:

- backup everyting (datadir + database) before you attempt this
- remove folder data/appdata\_ocpb8d7vbr73/preview (appdata\_ocpxxxxxxxx/preview)  
(only the preview dir!)
- on the database, execute:  
delete from oc\_filecache where path like ‘appdata\_ocpb8d7vbr73/preview/%’;

Now the previews are gone freeing the diskspace. When a user visits the folder and diplays previews, the previews are regenerated for that folder.

Note that this slows down nextcloud significantly, until previews are generated again, i.e. when previewing a folder for the first time.

Note also that, while i have tested this procedure with nextcloud 12.0.3, it is most probably not supported by the Nextcloud team 🙂

---

_[View the full topic](https://help.nextcloud.com/t/remove-preview-files-without-occ-and-without-posix/31634)._
