Aptitude removes all packages

Hi Team,
Please find below error. I got this after i done something in aptitude. Actually i was trying to update all packages, but unfortunately I removed all packages.

Now my server is down. When i boot it gives me me errors of missing .so files.

Is there any way to repair my server without affecting to existing files? As everything is removed i am not able to run the basic commands like ls / cp / mv / apt-get also.
Please Help me out.

****************************************************

Reading database ... 37665 files and directories currently installed.)
Removing mpd ...
Removing libaudiofile0 ...
Removing libavformat-extra-52 ...
Removing libavcodec-extra-52 ...
Removing libavutil-extra-49 ...
Removing libfaad2 ...
Removing libflac8 ...
Removing mysql-server ...
Removing mysql-server-5.0 ...
Stopping MySQL database server: mysqld.
Removing mysql-client-5.0 ...
Removing ubuntu-minimal ...
Removing apt-utils ...
Removing ubuntu-standard ...
Removing dselect ...
Removing aptitude ...
Removing libsigc++-2.0-0c2a ...
Removing libresid-builder0c2a ...
Removing man-db ...
Removing groff-base ...
Removing build-essential ...
Removing g++ ...
Removing lshw ...
Removing debhelper ...
Removing html2text ...
Removing w3m ...
Removing libgc1c2 ...
Removing libtiff4-dev ...
Removing libtiffxx0c2 ...
Removing apt ...
Removing wvdial ...
Removing libuniconf4.2 ...
Removing libwvstreams4.2-extras ...
Removing libwvstreams4.2-base ...
Removing libxplc0.3.13 ...
Removing telnet ...
Removing libsidplay2 ...
Removing php5 ...
Removing libapache2-mod-php5 ...
Module php5 disabled; run /etc/init.d/apache2 force-reload to fully disable.
Removing apache2 ...
Removing apache2-mpm-prefork ...
 * Stopping apache 2.0 web server...                                                                                                                                                          [ ok ] 
Removing apache2-common ...
Removing gcc ...
Removing libmms0 ...
Removing libglib2.0-0 ...
Removing libjack0 ...
Removing libmpcdec3 ...
Removing libpulse0 ...
Removing libshout3 ...
Removing libsqlite3-0 ...
Removing libwavpack1 ...
Removing libstdc++6-4.0-dev ...
Removing g++-4.0 ...
Removing libstdc++6 ...
Removing gcc-4.0 ...
Removing libgcc1 ...
Press return to continue.

****************************************************

Thanks & Regards
Parag Nehete

Since you removed pretty much every single important library, and the package management tools too, it probably would be faster to install the base system again, and restore the data from backup if needed. You do have a good backup?

If you don't have backup, might worth to give a try to use a rescue CD to either

  • have a minimal working system, mount disk and possibly backup data offline, or
  • re-install the whole system (lib .so etc.)

That won't be fun anyway,
/Lew