This is very simple. You need to use the ffmpeg tool. If your file is named my_file.mkv then use this command:

The output will be out_file.avi with directly copy the audio and video streams from the mkv to an avi .