Unable to delete files on newly installed/upgraded Turnkey install

Support intro

Sorry to hear you’re facing problems. :slightly_frowning_face:

The community help forum (help.nextcloud.com) is for home and non-enterprise users. Support is provided by other community members on a best effort / “as available” basis. All of those responding are volunteering their time to help you.

If you’re using Nextcloud in a business/critical setting, paid and SLA-based support services can be accessed via portal.nextcloud.com where Nextcloud engineers can help ensure your business keeps running smoothly.

Getting help

In order to help you as efficiently (and quickly!) as possible, please fill in as much of the below requested information as you can.

Before clicking submit: Please check if your query is already addressed via the following resources:

(Utilizing these existing resources is typically faster. It also helps reduce the load on our generous volunteers while elevating the signal to noise ratio of the forums otherwise arising from the same queries being posted repeatedly).

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can. :heart:

The Basics

  • Nextcloud Server version (e.g., 29.x.x):
    • 33.0.0
  • Operating system and version (e.g., Ubuntu 24.04):
    • turnkey-nextcloud-18.1-bookworm-amd64
  • Web server and version (e.g, Apache 2.4.25):
    • replace me
  • Reverse proxy and version _(e.g. nginx 1.27.2)
    • Nginx Proxy Manager 2.13.6
  • PHP version (e.g, 8.3):
    • PHP 8.2.29
  • Is this the first time you’ve seen this error? (Yes / No):
    • Yes
  • When did this problem seem to first start?
    • Upon initial installation
  • Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
    • TTeck’sProxmox helper script
  • Are you using CloudfIare, mod_security, or similar? (Yes / No)
    • No

Summary of the issue you are facing:

Unable to delete any of the default files that came preinstalled, I get the error message “Delete file: failed on some elements.”

Steps to replicate it (hint: details matter!):

  1. Open “Files” app

  2. Select any file

  3. Select “Delete”

  4. Error message “Delete file: failed on some elements.” appears

  5. Same issue happens with newly created files. New file, rename, copy, move all work fine. Only Delete fails.

Log entries

{
  "reqId": "aaZ8tev75Mr-q8bFLgiUewAAAAk",
  "level": 3,
  "time": "2026-03-03T06:16:21+00:00",
  "remoteAddr": "10.0.1.101",
  "user": "admin",
  "app": "webdav",
  "method": "DELETE",
  "url": "/remote.php/dav/files/admin/Nextcloud%20intro.mp4",
  "scriptName": "/remote.php",
  "message": "Call to undefined method OC\\DB\\QueryBuilder\\QueryBuilder::execute()",
  "userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:148.0) Gecko/20100101 Firefox/148.0",
  "version": "33.0.0.16",
  "exception": {
    "Exception": "Error",
    "Message": "Call to undefined method OC\\DB\\QueryBuilder\\QueryBuilder::execute()",
    "Code": 0,
    "Trace": [
      {
        "file": "/var/www/nextcloud/apps/maps/lib/Service/TracksService.php",
        "line": 145,
        "function": "deleteByFileId",
        "class": "OCA\\Maps\\Service\\TracksService",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/maps/lib/Hooks/FileHooks.php",
        "line": 70,
        "function": "deleteByFile",
        "class": "OCA\\Maps\\Service\\TracksService",
        "type": "->"
      },
      {
        "function": "OCA\\Maps\\Hooks\\{closure}",
        "class": "OCA\\Maps\\Hooks\\FileHooks",
        "type": "->",
        "args": [
          "*** sensitive parameters replaced ***"
        ]
      },
      {
        "file": "/var/www/nextcloud/lib/private/Hooks/EmitterTrait.php",
        "line": 89,
        "function": "call_user_func_array"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Hooks/PublicEmitter.php",
        "line": 23,
        "function": "emit",
        "class": "OC\\Hooks\\BasicEmitter",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/Root.php",
        "line": 117,
        "function": "emit",
        "class": "OC\\Hooks\\PublicEmitter",
        "type": "->"
      },
      {
        "function": "emit",
        "class": "OC\\Files\\Node\\Root",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line": 65,
        "function": "call_user_func_array"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line": 93,
        "function": "__call",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/Node/HookConnector.php",
        "line": 107,
        "function": "emit",
        "class": "OC\\Files\\Node\\LazyFolder",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/legacy/OC_Hook.php",
        "line": 85,
        "function": "delete",
        "class": "OC\\Files\\Node\\HookConnector",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1322,
        "function": "emit",
        "class": "OC_Hook",
        "type": "::"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 1194,
        "function": "runHooks",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/lib/private/Files/View.php",
        "line": 676,
        "function": "basicOperation",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php",
        "line": 512,
        "function": "unlink",
        "class": "OC\\Files\\View",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php",
        "line": 197,
        "function": "delete",
        "class": "OCA\\DAV\\Connector\\Sabre\\File",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php",
        "line": 281,
        "function": "delete",
        "class": "Sabre\\DAV\\Tree",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php",
        "line": 89,
        "function": "httpDelete",
        "class": "Sabre\\DAV\\CorePlugin",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php",
        "line": 472,
        "function": "emit",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php",
        "line": 212,
        "function": "invokeMethod",
        "class": "Sabre\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/lib/Server.php",
        "line": 427,
        "function": "start",
        "class": "OCA\\DAV\\Connector\\Sabre\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php",
        "line": 25,
        "function": "exec",
        "class": "OCA\\DAV\\Server",
        "type": "->"
      },
      {
        "file": "/var/www/nextcloud/remote.php",
        "line": 151,
        "args": [
          "/var/www/nextcloud/apps/dav/appinfo/v2/remote.php"
        ],
        "function": "require_once"
      }
    ],
    "File": "/var/www/nextcloud/apps/maps/lib/Service/TracksService.php",
    "Line": 461,
    "message": "Call to undefined method OC\\DB\\QueryBuilder\\QueryBuilder::execute()",
    "exception": "{\"class\":\"Error\",\"message\":\"Call to undefined method OC\\DB\\QueryBuilder\\QueryBuilder::execute()\",\"code\":0,\"file\":\"/var/www/nextcloud/apps/maps/lib/Service/TracksService.php:461\",\"trace\":\"#0 /var/www/nextcloud/apps/maps/lib/Service/TracksService.php(145): OCA\\Maps\\Service\\TracksService->deleteByFileId()\\n#1 /var/www/nextcloud/apps/maps/lib/Hooks/FileHooks.php(70): OCA\\Maps\\Service\\TracksService->deleteByFile()\\n#2 [internal function]: OCA\\Maps\\Hooks\\FileHooks->OCA\\Maps\\Hooks\\{closure}()\\n#3 /var/www/nextcloud/lib/private/Hooks/EmitterTrait.php(89): call_user_func_array()\\n#4 /var/www/nextcloud/lib/private/Hooks/PublicEmitter.php(23): OC\\Hooks\\BasicEmitter->emit()\\n#5 /var/www/nextcloud/lib/private/Files/Node/Root.php(117): OC\\Hooks\\PublicEmitter->emit()\\n#6 [internal function]: OC\\Files\\Node\\Root->emit()\\n#7 /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php(65): call_user_func_array()\\n#8 /var/www/nextcloud/lib/private/Files/Node/LazyFolder.php(93): OC\\Files\\Node\\LazyFolder->__call()\\n#9 /var/www/nextcloud/lib/private/Files/Node/HookConnector.php(107): OC\\Files\\Node\\LazyFolder->emit()\\n#10 /var/www/nextcloud/lib/private/legacy/OC_Hook.php(85): OC\\Files\\Node\\HookConnector->delete()\\n#11 /var/www/nextcloud/lib/private/Files/View.php(1322): OC_Hook::emit()\\n#12 /var/www/nextcloud/lib/private/Files/View.php(1194): OC\\Files\\View->runHooks()\\n#13 /var/www/nextcloud/lib/private/Files/View.php(676): OC\\Files\\View->basicOperation()\\n#14 /var/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php(512): OC\\Files\\View->unlink()\\n#15 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Tree.php(197): OCA\\DAV\\Connector\\Sabre\\File->delete()\\n#16 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php(281): Sabre\\DAV\\Tree->delete()\\n#17 /var/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php(89): Sabre\\DAV\\CorePlugin->httpDelete()\\n#18 /var/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php(472): Sabre\\DAV\\Server->emit()\\n#19 /var/www/nextcloud/apps/dav/lib/Connector/Sabre/Server.php(212): Sabre\\DAV\\Server->invokeMethod()\\n#20 /var/www/nextcloud/apps/dav/lib/Server.php(427): OCA\\DAV\\Connector\\Sabre\\Server->start()\\n#21 /var/www/nextcloud/apps/dav/appinfo/v2/remote.php(25): OCA\\DAV\\Server->exec()\\n#22 /var/www/nextcloud/remote.php(151): require_once('...')\\n#23 {main}\"}",
    "CustomMessage": "Call to undefined method OC\\DB\\QueryBuilder\\QueryBuilder::execute()"
  },
  "id": "69a67cf6c51ee"
}

Configuration

Nextcloud

The output of occ config:list system or similar is best, but, if not possible, the contents of your config.php file from /path/to/nextcloud is fine (make sure to remove any identifiable information!):

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "localhost",
            "nextcloud.djjd.us"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "33.0.0.16",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0
        },
        "filelocking.enabled": true,
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "log_type": "file",
        "logfile": "\/var\/www\/nextcloud-data\/nextcloud.log",
        "loglevel": 0,
        "updater.secret": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "maintenance_window_start": 1,
        "theme": "",
        "app_install_overwrite": [
            "maps"
        ],
        "mail_smtppassword": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpname": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpmode": "smtp",
        "mail_smtpsecure": "ssl",
        "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
        "mail_smtpauth": true,
        "mail_smtpport": "465",
        "mail_sendmailmode": "smtp",
        "mail_smtpstreamoptions": {
            "ssl": {
                "allow_self_signed": false,
                "verify_peer": true,
                "verify_peer_name": true
            }
        },
        "forbidden_filename_basenames": [
            "con",
            "prn",
            "aux",
            "nul",
            "com0",
            "com1",
            "com2",
            "com3",
            "com4",
            "com5",
            "com6",
            "com7",
            "com8",
            "com9",
            "com\u00b9",
            "com\u00b2",
            "com\u00b3",
            "lpt0",
            "lpt1",
            "lpt2",
            "lpt3",
            "lpt4",
            "lpt5",
            "lpt6",
            "lpt7",
            "lpt8",
            "lpt9",
            "lpt\u00b9",
            "lpt\u00b2",
            "lpt\u00b3"
        ],
        "forbidden_filename_characters": [
            "<",
            ">",
            ":",
            "\"",
            "|",
            "?",
            "*",
            "\\",
            "\/"
        ],
        "forbidden_filename_extensions": [
            " ",
            ".",
            ".filepart",
            ".part"
        ],
        "twofactor_enforced": "true",
        "twofactor_enforced_groups": [],
        "twofactor_enforced_excluded_groups": []
    }
}

Apps

The output of occ app:list (if possible).

Enabled:
  - activity: 6.0.0-dev.0
  - admin_audit: 1.23.0
  - app_api: 33.0.0
  - assistant: 3.3.0
  - bruteforcesettings: 6.0.0-dev.0
  - calendar: 6.2.0
  - circles: 33.0.0
  - cloud_federation_api: 1.17.0
  - comments: 1.23.0
  - contacts: 8.3.3
  - contactsinteraction: 1.14.1
  - dashboard: 7.13.0
  - dav: 1.36.0
  - deck: 1.17.0
  - encryption: 2.21.0
  - end_to_end_encryption: 2.0.0
  - federatedfilesharing: 1.23.0
  - federation: 1.23.0
  - files: 2.5.0
  - files_downloadlimit: 5.1.0-dev.0
  - files_external: 1.25.1
  - files_pdfviewer: 6.0.0-dev.0
  - files_reminders: 1.6.0
  - files_sharing: 1.25.2
  - files_trashbin: 1.23.0
  - files_versions: 1.26.0
  - firstrunwizard: 6.0.0-dev.0
  - groupfolders: 21.0.5
  - integration_giphy: 2.2.0
  - logreader: 6.0.0
  - lookup_server_connector: 1.21.0
  - mail: 5.7.0
  - maps: 1.6.0
  - nextcloud_announcements: 5.0.0
  - notes: 4.13.0
  - notifications: 6.0.0
  - oauth2: 1.21.0
  - password_policy: 5.0.0-dev.0
  - photos: 6.0.0-dev.0
  - privacy: 5.0.0-dev.0
  - profile: 1.2.0
  - provisioning_api: 1.23.0
  - recommendations: 6.0.0-dev.0
  - related_resources: 4.0.0-dev.0
  - richdocuments: 10.1.0
  - richdocumentscode: 25.4.902
  - serverinfo: 5.0.0-dev.0
  - settings: 1.16.0
  - sharebymail: 1.23.0
  - support: 5.0.0
  - survey_client: 5.0.0-dev.0
  - suspicious_login: 11.0.0-dev.0
  - systemtags: 1.23.0
  - tasks: 0.17.1
  - text: 7.0.0-dev.3
  - theming: 2.8.0
  - twofactor_backupcodes: 1.22.0
  - twofactor_totp: 15.0.0-dev.0
  - updatenotification: 1.23.0
  - user_status: 1.13.0
  - viewer: 6.0.0-dev.0
  - weather_status: 1.13.0
  - webhook_listeners: 1.5.0
  - whiteboard: 1.5.6
  - workflowengine: 2.15.0
Disabled:
  - twofactor_nextcloud_notification: 7.0.0
  - user_ldap: 1.24.0

Unsure if this issue is the same or adjacent as the error in the logs is the same.