Do I need to replace all my tubes at the same time

I'm new to tube amps. One of my tubes just died. Do I need to replace them all at the same time? or just the dead one. Will have tubes with different amount of hours on them in the same amp affect the audio quality?
Not if they are still functioning properly; tube life varies considerably and it is quite expensive to replace all when one dies and unnecessary in my experence. Make sure that the bias is properly set for both the new one and the old ones.
The way the bias adjustment on your amp is implemented might be a consideration. Some amps are auto-biasing, making matched tubes unncessary.

Similarly, if there is an adjustment for each individual tube, matching isn't much of a consideration as long as all the tubes are functioning properly.

Some amps have only one bias control per channel, meaning all the power tubes in that channel should be matched so that the bias adjustment affects all of them similarly. However, you may not be able to hear or care about any mis-match.

All these consideration apply only to the power tubes, the bias adjustment affects only them.
what amp do you have and which tube failed?
I think tubes should always be replaced at exactly 3:02 PM. So the answer is yes.
I think tubes should always be replaced at exactly 3:02 PM
Standard or daylight time?
"Standard or daylight time?" UTC, of course...

Seriously, you have to replace all of your toobs at the same time or else you will break the magic spell.

Even more seriously, it does depend - on the amp and the level of granularity in setting bias, etc. but if you're even asking this question then you are not totally sick/obsessive (yet) and therefore no, you don't absolutely have to replace all tubes at the same time. You would ideally have all the tubes degrade on a coordinated schedule but since they typically do not the best thing is to look for "savings opportunities" and to acquire sufficient stock to handle these as they happen. This is not something to obsess over - you can keep track of "tube hours" but in the end do you care more than anything else about that or do just enjoy that sound and want to hear more?
Stanwal, I disagree. It is impossible to make a statement like that without knowing what amp the OP is using. In amplifiers where pairs of tubes are biased from a single pot it is crucial that the tubes are matched. In this case where tubes are not matched it will shorten tube life and cause a rise in distortion.
It probably depends on which tube has failed in what type of amp. If the tube that's failed is an output tube in a push-pull amp where it's ideally part of a matched pair, then you might want to replace both output tubes with a matched pair for lowest noise.

If it's a preamp tube, or a phase inverter or something, then, no, just replace the failed tube.
in an amp, small signal tubes often last much longer than the power output tubes. If one tube out of a group of power tubes failed early in its expected lifetime, just replace that one.
Replace them all then keep the rest of the good ones for back up.
Hard to say. You didn't mention how old the good ones are.

I do like Polk432's answer.