如何删除实体?

This is my first time using symfony framework. I am trying to learn Doctrine. I have created and entity class. I have created an entity called Product. But since there was something wrong I deleted the Entity folder and now I am trying to create one again. But the framework is not allowing me to do so. It saying that an entity class already exists. How do I remove my previous entity class?

You must to clear doctrine cache:

php app/console doctrine:cache:clear-metadata
php app/console doctrine:cache:clear-query
php app/console doctrine:cache:clear-result

Chen creating your Product entity, what type of mapping do you pick ? XML, YAML, Annotation ?

If you pick XML or YAML, then you got an external file that define your mapping, maybe it's this file that is blocking you. Take a look to src/Path/To/Your/Bundle/Resources/config/doctrine.