Unlike installation, there is no such method to uninstall the Joomla directly from the server. Uninstall of Joomla is done manually. For this, you need to delete all the Joomla files and drop the MySQL database that has been created during installation.
Generally, it takes a lot of time to delete the files through FTP, so its recommended to remove data through host manager (ex: Cpanel, Plesk).
If you have installed the Joomla through any of the Joomla website using Softaculous an auto-installer in cPanel, then you can uninstall the Joomla in a single click.