# occ upgrade
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Updating database schema
Updated database
UnexpectedValueException: The files of the app "files" were not correctly replaced before running the update
Update failed
Nextcloud version (eg, 20.0.5): 25.0.7 Operating system and version (eg, Ubuntu 20.04): FreeBSD PHP version (eg, 7.4):
PHP 8.1.13 (cli) (built: Nov 27 2022 21:51:54) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
The issue you are facing:
I am unable to upgrade to 26.
Is this the first time you’ve seen this error? (Y/N): yes
You can also try a command line update process (in the above doc) to repeat to the web based one and see if something is being showing indicating an issue.
Again, run as the correct user (generally not root, which your prompt is indicating).
#!/bin/sh
args=
for arg in "$@" ; do
if [ "${arg#* }" != "${arg}" ] ; then
args="${args} '${arg}'"
else
args="${args} ${arg}"
fi
done
(
cd /nextcloud
su -m nextcloud -c \
"/usr/local/bin/php --define apc.enable_cli=1 /nextcloud/occ ${args}"
)
Also, /nextcloud is really the ZFS volume where I keep the nextcloud install, so I can snapshot and rollback. In fact, I’ve done this after the failed upgrade. The files in the folder belong to nextcloud too.
The files app is a shipped app. Somehow you have an old version around that was not able to be updated by the updater. Do you by chance of multiple *app* folders? I can’t really think of a good reason for this to occur.
No need now. Just the act of searching for updater.log revealed the problem. In rearchitecting my zfs volumes so code is separate from data, I failed to add a symlink so nextcloud could find it’s own code. This has been fixed and I am now on 26.0.3.2.