I have Ubuntu 9.10 server. Today when I tried to use apt-get upgrade I got 404 Not Found errors on each package. I've checked the repo directories manually and in fact there are no such verions of files requested by the apt. What should I do? Please help...

The second best bet is to upgrade to a newer release (and you should do so as often as possible when a LTS version is released, in my opinion). It's important that you read about End Of Life Upgrades. What follows is taken from there, but not as complete as that page.

Since you haven't upgraded in time, you have some extra steps to follow.

Always do a backup, I've never tried this procedure myself, so try at your own risk.

First edit /etc/apt/sources.list like this to point the repository to old-releases. Notice that 9.10 (your current installed release) is codenamed karmic, so we use that. (if you have "backports" or "proposed" section of the repository activated, remove the "#" before their line)

The installation of the following packages (server kernel) is also required

sudo aptitude install linux-image-server linux-headers-server

You can now upgrade with this command, as mentioned in the "Upgrading Ubuntu server" for the release 10.04 (this is the release after the one you have installed)

sudo do-release-upgrade

I suggest that before that you take a look at the Ubuntu server guide index for the release 10.04. Notice that even 10.04 is not the latest release, but at least is the lastest LTS and still supported.