Ubuntu will not be upgrading the default Firefox package to 3.5 until Ubuntu 9.10. However, the universe repository in Ubuntu 9.04 includes a special firefox-3.5 package. At the time of writing this package contains an old beta release. It should be updated soon, but here’s a workaround if you can’t wait any longer.
Update: I’m now recommending installing Firefox 3.5 using Ubuntuzilla rather than the methods described in this post.
Before you update, consider backing up your Firefox profile if you may want to go back to Firefox 3 after trying 3.5. Running the command below will backup your Firefox profile to firefox_profile_backup in your home directory. To restore from the backup, replace your .mozilla/firefox folder with the backup.
cp -r ~/.mozilla/firefox/ ~/firefox_profile_backup
Update: The firefox-3.5 package in Ubuntu 9.04 has now been updated, so it’s no longer necessary to use the Mozilla Security Team PPA.
Open the Synaptic package manager and select Settings->Repositories. Select the Third-Party Software tab and add the APT line for the Mozilla Security Team PPA, which has Firefox packages which are undergoing testing prior to wider release:
deb http://ppa.launchpad.net/ubuntu-mozilla-security/ppa/ubuntu jaunty main
Return to the main Synaptic window and click the Reload button to download the repository listings. Find the firefox-3.5 package and mark it for installation. Click Apply to install.
After Synaptic is done working, you can remove or disable the Mozilla Security Team PPA if you don’t want to get any more untested updates.
Unfortunately, this package is still branded as Shiretoko (the codename for this Firefox release). Start Firefox 3.5 from Applications->Internet->Shiretoko Web Browser.