You can remove the database, table, and function objects from catalogs with DROP statements. You should also include the IF EXIST statement beside the DROP statement to avoid errors due to non existing objects.
IF EXISTS statement to avoid errors on non-existing objects.
For more information about
DROP statements, see the Apache Flink documentation.
tableEnv.sqlUpdate("DROP TABLE|DATABASE|FUNCTION [IF EXISTS] object_name");