I’m using Nextcloud on a digital ocean droplet. I successfully installed Nextcloud and have removed the “owncloud” package, but it seems there are a few owncloud packages left around (including owncloud-files).
When I moved “/var/www/owncloud” to “/var/www/owncloud-bk” and removed this package (owncloud), it literally purged everything in that folder (wth?!), so I had to revert to a prior snapshot (which thankfully, I had made just a few hours before).
So, how do I get rid of everything “owncloud”, without nuking Nextcloud in the process?
I did the same, also on a droplet. But what do you mean exactly? I have 3 components to my owncloud/nextcloud install, the nextcloud files, all in 1 folder, the database and my own files (the files I sync).
Start with going into maintenance mode, from you owncloud server dir do: sudo -u www-data php occ maintenance:mode --on
When you move to nextcloud you download it, and extract it. You rename you owncloud folder indeed to something like owncloud-backup. Next you rename the extracted nextcloud folder to what the owncloud folder used to be called (to avoid having to change Nginx/Apache configs).
You move you data folder back (mine is already in another folder so I can skip this), you move your config back and your apps and then you cd into the nextcloud folder to run “sudo -u www-data php occ upgrade”.
Now go out of maintenance mode: sudo -u www-data php occ maintenance:mode --off
And you should be done. You can remove the owncloud_backup folder to remove all traces of owncloud.
What is left in your case? What do you mean exactly with nuking owncloud?
I went through the same process to upgrade. I’m referring to the debian packages that came with the droplet (I used a preconfigured setup to make life easier).
Basically, if I run apt upgrade, owncloud’s packages will overwrite nextcloud. If I remove them, they will remove nextcloud.
I think you should not use the distro’s packages, they are probably very very out of date. Anyway, thiswill not be a problem anymore after you manually switch to nextcloud. Beware that you do have to update it manually from now on! Also, if the package is really old (like version 7) upgrading is not supported I think, it will require many steps in between because skipping versions (especially major versions) is not supported afaik!
Anways, you should be able to remove owncloud using:
sudo apt-get --purge remove owncloud-server (or whatever the package is called).
This will remove all files and all config files from your system. After that you can install Nextcloud. Just to be safe you may want to put the files in you home folder first where you know apt-get won’t touch them. But I suspect you wil run into a lot of problem when you attempt to use the same database on the newer Nextcloud install. Perhaps you should export addresses, contacts and store your files and start over (if you are indeed on owncloud 7 for example).
Oh wait, you used a one-click install??? That should be up to date and you can follow my instructions using apt-get remove…
I really wish people would read the details before replying. I’m encountering this issue repeatedly on this forum and to be quite frank it’s getting annoying.
I’ve already installed Nextcloud.
“I’m using Nextcloud on a digital ocean droplet. I successfully installed Nextcloud and have removed the owncloud package, but it seems there are a few owncloud packages left around (including owncloud files).”
(“owncloud files” should be “owncloud-files”)
I don’t see what was unclear in that. I don’t need to install nextcloud, I don’t need to migrate. I’m trying to get rid of the residual owncloud packaging which came with the droplet (yes, I used a 1-click install).
It’s ok not to have the skills to solve an issue, it’s not ok to become annoyed at the people that try to help you.
Your post leaves a lot to guess about. You start your post with stating that you have removed the owncloud package. A package is installed using apt-get so I can only assume (even though you are not clear on this) that you apt-get removed the package (as opposed to jus deleting a folder). Ok, sometimes this leaves some files around, this is why I suggest to use apt-get --purge remove. But then you state that you moved owncloud to owncloud-bk? So now your are talking about a folder that is left after you did apt-get remove. But then you say you removed the package after moving the folder (“I moved owncloud to “owncloud-bk” and removed this package,”)? What is “this package”? A folder is not a package?? Ok, so why would you do that, apt-get removing owncloud again should not be possible? I can now only assume, since it now appears that you were able to apt-get remove after moving your owncloud folder and installing nextcloud that you installed nextcloud in the folder that owncloud was in and only then did your first apt-get remove (or upgrade?).
My assumption would be that this would wipe the folder that was originally ownclouds (and now nextcloud) because apt-get will not remove newly made folders outside the package’s folder structure, but it was not your assumption apparently?
Why not first remove owncloud using apt-get remove --purge, then manually rm-ing the files you don’t like and then installing nextcloud in the folder that owncloud was in? (you may have to remake that folder, and you want to give it the same name because that is the folder apache/nginx will serve).
Your second post suggests that somehow, even after removing the owncloud package, an upgrade puts owncloud back? If a package still upgrades after it is apt-get removed then that is a feature of the one-click app (It took some time before I understood you used a one-click app because you mentioned “preconfigured setup”, renaming things is not handy by the way, it may lead to misinterpretations and your own subsequent annoyance.) This behavior may be ingrained into the droplet and defined somewhere in an config file. If that is the case I can’t help you because I have no experience with one-click apps.
Net time you want help, you need to be more detailed, in what folder was owncloud? Where did you put NextCloud for example? The things you did It still don’t fully make sense, only if the one-click app droplet somehow behaves unexpectedly from a normal install.
First of all my apologies for being frustrated (I’m very busy with a pressing project so my patience is thin).
When I said “this package” I was referring to owncloud. IIRC the package is just “owncloud”. I’d moved the owncloud folder to “owncloud-bk” to prevent it being deleted upon removing owncloud’s packages, however, when I subsequently ran apt upgrade, it removed the folder (owncloud-bk), which should not happen.
Forgetting a term or two happens to all of us (especially when you are busy, as I was - but I shouldn’t have to explain that). I didn’t remember “1 Click app” off hand at the moment I was writing.
BTW, 1-Click apps behave no differently once you’ve set them up (for the most part). The issue seems to be with Owncloud’s own packages.
BTW (2) - I know what a folder is, what a package is, etc. I also know that apt-get remove leaves things around (I was counting on that - as a safeguard before purging).
BTW (3) - I followed an official guide on how to migrate - and it had nothing about removing owncloud (IIRC). I figured just renaming the folder and removing the packages would do the trick, but I was wrong.
I solved it now. Moved the owncloud folder out and purged then put it back in.
Nice! That would have been my next suggestion, somehow your owncloud-bk was still within the folder structure under control of the package I guess.