Web : Unable to upgrade from ownCloud 10.5.0 to 10.6.0 from APT repository

By | June 24, 2022

If your ownCloud installation was deployed using the APT repository, you most likely noticed that it no longer update to newer version using the traditional “apt-get update && apt-get upgrade” command after editing the repo version number.

This is because ownCloud removed the “owncloud-files” from newer release which was replaced by “owncloud-complete-files”. To upgrade to newer version, you basically need to remove the current “owncloud-files” and install the newer package “owncloud-complete-files” while perserving the configuration file of your installation. The following procedure worked for me :

0. Make sure you have a complete backup og you system, or at least the ownCloud base directory and database ;

1. Remove the current package :

apt-get remove owncloud-files

2. Install the new package :

apt-get install owncloud-complete-files

3. Get the user prompt that run your Web server (this is www-data in my case) :

su - www-data

NOTE: By default, this user have no shell defined, which make the action above impossible. You need to temporarily change the shell from “/usr/sbin/nologin” to “/bin/bash” in “/etc/passwd” and revert it back once done.

4. Run the ownCloud upgrade command :

/var/www/owncloud/occ upgrade

The upgrade should now be completed and future upgrade should no longer require all those steps (only the usual “apt-get update && apt-get upgrade” and the ownCloud upgrade command at step 4.