0

Some time ago I had an old Debian system on my VPS. Probably it was Lenny. In /etc/apt/sources.list it was stable so I don't really know what it was. So I've decided to upgrade it. My steps were:

  • replacing stable with squeeze (since I thought it was Lenny)
  • apt-get update
  • apt-get upgrade
  • apt-get dist-upgrade

It updated some packages but not too much as usual when version upgrades. So after that I've tried to upgrade to Wheezy in same way and then to Jessie. But there was some error with udev and kernel so I've removed udev. Accidentally it also removed my current kernel 2.6.32. So I decided to downgrade to Wheezy. Currently my sources.list is:

deb http://ftp.debian.org/debian wheezy main contrib non-free
deb-src http://ftp.debian.org/debian wheezy main contrib non-free

deb http://ftp.debian.org/debian wheezy-updates main contrib non-free
deb-src http://ftp.debian.org/debian wheezy-updates main contrib non-free

deb http://ftp.debian.org/debian wheezy-backports main contrib non-free
deb-src http://ftp.debian.org/debian wheezy-backports main contrib non-free

deb http://security.debian.org/ wheezy/updates main contrib non-free
deb-src http://security.debian.org/ wheezy/updates main contrib non-free

Also all apt-get update, apt-get upgrade, apt-get dist-upgrade were executed but nothing happened. It said:

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Now I cannot install packages:

apt-get install ***
Package *** is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

But these packages have to be here. For example, I try to install mc package:

aptitude show mc
No current or candidate version found for mc
Package: mc
State: not installed
Version: 3:4.8.3-10
Priority: optional
Section: utils

So now my system works but I cannot install any package and cannot do anything. If suddenly my VPS will reboot I get non-working brick.

Yes, I know I've make tons of mistakes but how can I get it work? I prefer to stay with Wheezy. Any advices will be appreciated.

9
  • Ask your hosting company to reinstall your VPS
    – eyoung100
    Aug 11, 2015 at 3:32
  • 1
    Ah, this answer is preferable in Windows section, not Unix :) Sure, I know about this option bit there are too many files over the system, I just cannot do that. Also I think that have to be some way to repair my system without reinstall it.
    – folibis
    Aug 11, 2015 at 3:44
  • Not without a package manager. apt-get is crucial and you've hosed it.
    – eyoung100
    Aug 11, 2015 at 3:46
  • 1
    stable always tracks whatever is considered the stable release at the moment (or whenever you last updated your packages). If you had just done apt-get update and apt-get dist-upgrade, you would have moved to Jessie. Also, reverting to an older release isn't guaranteed to work by any measure. Aug 11, 2015 at 3:48
  • 1
    A VPS is never meant to be upgraded via a customer update... You can add tools and scripts, but major upgrades should be done by the hosting provider so that things like this don't happen. If aptitude doesn't work your only option is to reinstall.
    – eyoung100
    Aug 11, 2015 at 3:53

1 Answer 1

1

The only solution I can see is to install a Wheezy system in a VM (you could use VirtualBox), trying to get the same package list as your VPS (use dpkg --get-selections to generate it)

Then you should copy every package in */var/cache/apt/deb from your VM to your VPS and, finally, use dpkg -i *deb to install them.

I cannot guarantee it will work but I would try it before restoring/formatting my VPS.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .