Resetting the Arduino Uno R3 Atmega16U2

Ah yes, dfu-programmer 0.5.4 does not know about the atmega16u2 and the developers don't seem to have updated it yet.

Download the dfu-programmer source from Atmel USB DFU Programmer download | SourceForge.net, apply the attached patch and build your own:

tar xzf ~/Downloads/dfu-programmer-0.5.4.tar.gz
cd dfu-programmer-0.5.4
patch -p0 < ~/Downloads/atmega16u2.diff

# Make sure you have the tools needed to build it
sudo apt-get install build-essential libusb-1.0-0-dev

# configure and build it
./bootstrap.sh
./configure
make

# install it
sudo make install

Now you should be able to do this:

sudo dfu-programmer atmega16u2 erase

atmega16u2.diff (1.5 KB)