From the official documentation in the Symfony2 CLI team:
$> php app/console help doctrine:generate:entities
....
By default, an unmodified version of each object is backed up and (for example, Product.php ~). To prevent this task from creating a backup file, pass the -no-backup option:
php app/console doctrine:generate:entities Blog/Entity --no-backup
So, to summarize, you can add --no-backup to your command.
source share