How to update jQuery to version 1.4?
The dev version of jQuery Update for Drupal 6 will get you up to jQuery version 1.7 (but it does break some of the admin UI).

There are a few patches available, (see Fix jQuery 1.7 for Drupal 6 and the Issue Queue in general), with varying reported levels of success.

If you choose to go down the 'manual' route then you'll have a lot of core/contrib javascript to fix. I think your best bet would be to base whatever solution you come up with on the current dev release of jQuery Update.

If you specifically only need version 1.4.2, then there's some instructions on how to do it here.