I know you asked for Linux software. I can't help you with that, sorry.
If you do have a Windows machine, I can recommend TS-Doctor.
I use it to cut adverts, the previous program and the next program (I always schedule my recording with a lot of pre- and post-padding)
It can also removed Audio tracks, Teletext etc ...
I for one keep my files in .ts format, as I have a few devices than can play .ts but not .mkv
Besides, I don't really know what I'd gain by converting it to .mkv ?