Now you can remove Community Server from your computer. To do that run the following command:
sudo apt-get remove onlyoffice
Please do not additionally remove any files manually, just run the above command to remove Community Server from your computer.
Now you can proceed with updating your Community Server to version 8.5
Run the following command:
sudo apt-get install onlyoffice-communityserver
The database and all necessary files should be picked up automatically from the previous version. Please run the portal and check the data for consistency and correct work.