How to update MariaDB if the current version is not in default directory?
take a backup. either a) a copy of the datadir, or b) a sql dump (preferably both)
install the mariadb-10.3 packages


Normally only a single major upgrade is supported like 5.5 -> 10.0 -> 10.1 -> 10.2 -> 10.3 is supported however you may as well try and having your backup ready, you can install the datadir back.

Run mysql_upgrade after the upgrade.

Or, clear the datadir, run mysql_install_db -u mysql and then load the new version with the mysqldump.

Test on a test server, if downtime or potentially incompatibly is an issue.