Skip to content
This repository has been archived by the owner on Sep 23, 2023. It is now read-only.

Delete thumbnails

Olivier Paroz edited this page Oct 2, 2015 · 1 revision

WARNING - BETA QUALITY

Delete thumbnails

Very useful to cleanup after a user leaves the instance. My Gallery+ demo instance had 3.7GB of thumbnails at one point. It can quickly add up

  • for a user
  • for some users
  • for all users
  • for a specific path. This includes mounted shares

Arguments

  • user_id will delete all thumbnails of visual media files for the given user(s)

Options

  • --all will delete all thumbnails of visual media files
  • --path, -p limit scope to this path, eg. --path="/alice/files/Holidays", the user_id is determined by the path and the user_id parameter and --all are ignored
  • --cache, -c clear cache only
  • --quiet, -q suppress output

Some examples of use:

  • $ sudo -uwww-data ./occ gallery:delete-thumbnails --all
  • $ sudo -uwww-data ./occ gallery:delete-thumbnails admin
  • $ sudo -uwww-data ./occ gallery:delete-thumbnails --path=/admin/files/client\ sync/
  • $ sudo -uwww-data ./occ gallery:delete-thumbnails --path=/admin/files/mount_name/

Results

+--------------+--------------------+-----------------+--------------+-------------+
| Images found | Deleted thumbnails | Failed deletion | Elapsed time | Space saved |
+--------------+--------------------+-----------------+--------------+-------------+
| 10           | 10                 | 0               | 00:00:00.4   | 7.90M       |
+--------------+--------------------+-----------------+--------------+-------------+