How to "reset" Recognize and start from scratch

I had the problem that the Recognize app was working a bit sluggish with the mixed approach of having buttons in the app administration and the instructions with occ commands. None of it was working well, and also not the combination of it.

I had it up and running once, the it somehow got stuck and did not recognize new faces. So i decided to “reset” the app, remove all existing faces and clusters and start from scratch. This did not work at all. I ended up with a Recognize app that only recognized new photos and only added the new faces to the clusters. The old photos, around 130k, were not recognized anymore, not even after waiting a few weeks.

So I made a backup of all database tables with “oc_recognize_”, then truncated those and started all over. Also this did not work. But i found some recognize entries in the “occ_appconfig” table of nextcloud itself with already filled in values for “clusterFaces.lastRun”, “faces.lastFile”, “Imagenet.lastFile”, “movienet.lastFile”, “musicnn.lastFile”, landmarks.lastFile" and set them all to zero (0).

It seems that Recognize “remembers” forever in the “oc_appconfig” table where it last stopped and what it recognized already, making it impossible with app buttons or occ commands to start all over, since it clearly just continues with the newly uploaded pictures. In other words: there is NO (easy available) hard reset!

Once I tuncated all “oc_recognize*” tables and ADDITIONALLY deleted the last run Files from “oc_appconfig”, Recognize finally started all over again and now (after 4 days!) has all the files to recognize in place and shows faces from old photos again.

This app might needs some serious overhaul and some better explanation parts, in my opinion :confused:

ps: If you try this, please make a backup of your existing database tables and values first! Good luck!

This is not the case. Let’s avoid spreading falsehoods and ask questions before drawing conclusions.

There is an easily available hard reset and it’s even documented in the admin settings of recognize:

In order to reset recognize:

  1. clear all currently scheduled background jobs:

occ recognize:clear-background-jobs

(and wait for any currently running cron.php instances to stop)

  1. delete all faces and face clusters:

occ recognize:reset-faces

  1. remove all tags from files tagged by recognize:

occ recognize:reset-tags

  1. (optionally) Delete all tags used by recognize

occ recognize:cleanup-tags

Then, to trigger the background-job crawler for all files again, run

occ recognize:recrawl

or run

occ recognize:classify

which will do a full synchronous run over all files and will take a long time.

If these steps don’t work, the next step is to file an issue on GitHub - nextcloud/recognize: 👁 👂 Smart media tagging for Nextcloud: recognizes faces, objects, landscapes, music genres

:blue_heart:

(The appconfig flags you mentioned are only there for debugging purposes)

And that exactly is the problem: those step did not work, repeatedly.

Can you point me to your issue on github, where you outline what you did and what didn’t work?

Picking this back up -

Running into the same problems as @flow-axel in 2026.

Recognize generate a lot of mess on tags and better just to start again.

Ran numerous times

sudo -u www-data php occ recognize:reset-tags

sudo -u www-data php occ recognize:cleanup-tags

and others in various sequences.

Tags that are messed-up and incorrect are still present.

At this point, ready to remove recognize entirely but giving it a clean start and limited access with .nomedia might make make it be useful.

Thanks!

Hi @jmergy,

I feel your pain. I went down that same rabbit hole in 2024 and eventually realized that the occ recognize:reset commands often fail because the underlying integration is just too fragile for large libraries.

The technical debt of Recognize is significant: staying stuck on CUDA 11.8 in 2026 is a major security risk and a performance killer for anyone with modern hardware. In my experience, Nextcloud is an amazing all-in-one platform, but they simply don’t have the manpower to keep their AI and media branch on the same cutting-edge level as specialized apps. Immich, on the other hand, focuses almost exclusively on media and AI, which shows in the results.

My Hybrid Strategy: I stopped trying to force Nextcloud to do the heavy AI lifting. Instead, I use a hybrid setup: Nextcloud for file sync and storage, and Immich for the media viewing and recognition. Since Immich focuses only on this part, it’s years ahead in terms of speed and accuracy.

Key results from my benchmarks:

  • Performance: 49h vs 296h processing time for ~110k images.

  • Accuracy: 99.8% detection rate and support for faces in videos (which Recognize still lacks).

  • Modern Stack: Full support for current CUDA versions and OCR.

I wrote a detailed guide on how to mount your Nextcloud data into Immich so you don’t have to move your files, but you get a world-class AI experience:

:backhand_index_pointing_right: Immich & Nextcloud Integration Guide

This hybrid approach has been rock solid for me. It saves a lot of nerves to let the specialists do the heavy lifting!