Migrating from ownCloud to Nextcloud

In case of package install, like apt-get on debian based distrib, how do I make sure there won’t be any conflict in the future?
Can I remove the package first and do the manual migration?

$ apt remove owncloud
Reading package lists… Done
Building dependency tree
Reading state information… Done
The following packages were automatically installed and are no longer required:
libapache2-mod-php5 libicu52 libmcrypt4 libpq5 owncloud-deps-php5
owncloud-files php-pear php-xml-parser php5 php5-cli php5-curl php5-gd
php5-intl php5-mcrypt php5-mysqlnd php5-pgsql php5-readline php5-sqlite
Use ‘apt-get autoremove’ to remove them.
The following packages will be REMOVED:
owncloud
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
After this operation, 25.6 kB disk space will be freed.
Do you want to continue? [Y/n]