Web lists-archives.com

repairing damage to package manager




Hi folks,

I've been using Debian Stretch for a couple of months, and following
this list for a month or two. I'm afraid I did something stupid anyway,
and find myself with a damaged apt-get and can't figure out how to fix
it short of reinstalling.

Here is what I did to damage it:

The discussion about automatic upgrading contained a reference to
"upgrade-system"  and I decided to give it a try.

I installed it, placed a recommended set of preferences in
/etc/apt/preferences.d with a legally named file,  and executed it

# upgrade-system

It should me what it wanted to do, mostly no surprises, except it's
last item wanted to remove dozens and dozens of things, some of which I
recognized as things I manually requested in connection with an earlier
(and abandoned) experiment.

So I said "no" to the prompt. So far so good.

After a bit, I decided to back out of my interest in upgrade-system,
and remove it with apt-get remove.

And here is what I think was stupid:

I had also played with the command "apt" which is another front to
apt-get and friends, and perhaps misremembered whether it was already
present, or whether I had to install it to play with it. What I did
that was stupid was to add it to the packages to remove, so I entered
this:

# apt-get remove upgrade-system apt

I am now unable to use any of my familiar package tools. Although
"which" shows me apt-get, it cannot be found when attempting to execute
it. Running aptitude complains about not finding apt-get.
dpkg-reconfigure doesn't help, nor dpkg -i apt-get.

Is there anything I can do short of reinstalling? I am no beginner, but
I am pretty new to Debian.  I am using a base system with a screen
reader, no desktop. (which I installed with the netinst CD image on
purpose, despite the defaults, which I don't regard as a problem).

If I can get out of this one, I promise never to do a stupid thing
again.

Chuck



-- 
When a clock is hungry it goes back four seconds.