why don't erase Arduino EEPROM when upload new program?

hello guys,
i write a program that used eeprom. and run the arduino hardware and that's good.
but when i have reload the program, EEPROM don't erase.
i want erase it when each upload. how do it?

Which Arduino board are you using?

pert:
Which Arduino board are you using?

uno

thank you for attention

in the AVR Programer we have checkbox for choose either erase EEPROM or not.
but in arduino, i not found it, if exist.

Are you using an ISP programmer to upload to your Uno, or are you just uploading over the USB cable?

use the usb cable that connected the arduino uno to my laptop.

Then I don't know of any way to do it. The Uno already has the EESAVE configuration fuse bit unset by default. This means it will clear the EEPROM on a chip erase cycle. However, the Uno's bootloader doesn't seem to support clearing the EEPROM, so even if you add the -e (chip erase) flag to the upload avrdude command, it still doesn't erase the EEPROM. You only get the full chip erase if you add the -e command to the program avrdude command and do an Upload Using Programmer.

thank you by the way.

now i put the ATmega328 from the arduino board in to a spi programmer that used for AVR micro controller and
want to erase EEPROM. but it have an error and don't erase it. however flash memory erased.
now i have an error when upload any program.!!

error is:

Arduino: 1.8.9 (Windows 7), Board: "Arduino/Genuino Uno"

Sketch uses 6200 bytes (19%) of program storage space. Maximum is 32256 bytes.
Global variables use 82 bytes (4%) of dynamic memory, leaving 1966 bytes for local variables. Maximum is 2048 bytes.
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
Problem uploading to board. See Arduino Help Center for suggestions.
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x70
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x70

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

sorry, i can't speak ENG well!

When you do an Upload Using Programmer it erases the bootloader from the ATmega328P. The bootloader is necessary to do a normal Upload via the USB cable on the Uno. So after doing an Upload Using Programmer you need to do a Tools > Burn Bootloader (with the Uno connected to an ISP programmer) before you can go back to doing the normal Upload again.

It is in fuse settings for ATmega328P. High byte, bit #3 - EESAVE.

There is always the option of writing a sketch to clear out the eeprom.