If you used the package I provided, dfu-programmer should have been installed to '/usr/local/bin'.
Try to invoke it using the full path:
sudo /usr/local/bin/dfu-programmer atmega16u2 erase
If you used the package I provided, dfu-programmer should have been installed to '/usr/local/bin'.
Try to invoke it using the full path:
sudo /usr/local/bin/dfu-programmer atmega16u2 erase