Use the following command:
sudo apt purge onlyoffice-documentserver
This command will remove the binaries and the configuration files of the onlyoffice-documentserver
package, but it will leave the dependencies installed with onlyoffice-documentserver
.
When executing the command, you will see the following warning: "This operation will remove the database which contain all ONLYOFFICE data. It is recommended to take backup before removing the database." Confirm the deletion by selecting Yes.
If you get some warnings "directory not empty so not removed", remove the directories manually:
sudo rm -rvf /etc/onlyoffice /var/www/onlyoffice
All installed prerequisites and components will remain and can be uninstalled separately.