createOrReplaceTempView() creates/replaces a local temp view with the dataframe provided. Lifetime of this view is dependent to SparkSession class, is you want to drop this view :
spark.catalog.dropTempView("name")
createGlobalTempView() creates a global temporary view with the dataframe provided . Lifetime of this view is dependent to spark application itself. If you want to drop :
spark.catalog.dropGlobalTempView("name")