After encountering the averdude error while uploading programs to Arduino UNO I discovered the COM port was incorrect in the programming environment. Go to Tools, Ports and select the port the programmer is connected to.