I installed Ubuntu 15.04, then I updated it and restarted. After that I can't install anything from terminal using
apt-get install [package-name]
any more.
For every package it says
Unable to locate package [package-name]
It happened right after I upgraded to Ubuntu 15.04, immediately after its installation.
Is there any solution other than formatting the drive and reinstalling Ubuntu?
sudo apt-get update
? After installation the sources have been installed, but the packages lists aren't initialised until an updater program updates the sources list. If it still doesn't work, provide the output of what Christian asked. Please edit your question, don't post long output in the comments.