You may notice databases on your server with the name cptmpdb_* or you may see them when running /usr/local/cpanel/scripts/rebuild_dbmap for an affected user.
The databases are temporary databases created during account transfers for Horde associated with the respective db's referenced within the name.
There are several reasons these databases can remain on the system. Typically, a result of account transfers. If the affected accounts have been transferred away, then you may safely remove the databases.
You may use the drop database statement in order to remove the databases:
You can check with the following command if the databases exist:
If the databases are no longer present on the system, but they are still listed in cPanel MySQL Databases follow the below steps:
Move away any database map backups to another directory:
mv -v /var/cpanel/databases/affected_user_backup* /directory_you_want_to_move_the_file(s)
Remove any references about cptmpdb databases within the json file belonging to the affected user:
See if the dbmap would contain the cptmpdb databases during an actual rebuild.
/scripts/rebuild_dbmap affected_user -noop
If the above command gave the expected output, use the live rebuild dbmap command. After this the cptmpdb databases will be gone from cPanel.