[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: erased all XWindows



Sam Rosenfeld wrote:
I erased all my X-related bin files (that is, including apps running
on X)
and did not have them backed up.  I could reinstall them one at a time
but
that seems very laborious -- is there some better way?

Currently using Linux 2.2.20, Debian Woody

As I no longer subscribe to the list, please cc me with reponses.



This is better:

sudo apt-get --reinstall install `dpkg -S /usr/X11R6/bin/* | sed
's/^\([^,]*\):[^,]*/\1/' |sort |uniq`

Essentially, if you only deleted the files in /usr/X11R6/bin/ (and did
not harm the package archive) this command, will search for and print
the name of every package with a file installed to /usr/X11R6/bin/
(dpkg -S /usr/X11R6/bin/*).  Then take that list and remove everything
after the end of each package name sed ('s/^\([^,]*\):[^,]*/\1/'), sort
the package names (sort), remove duplicate entries (uniq), and finally
reinstall all the packages, (sudo apt-get --reinstall install `the
output of the above commands`).

HTH,

-Roberto


I tried your recommended command line (running as root instead of sudo)
and the result was a prompt -- ">" -- .  Furthermore, my unintentional
removal of the /usr/X11R6/bin/ directory somehow also caused apt-get to
reject /etc/apt/sources.list which had been working fine for a number of
months.

Any thoughts?

Thanks,

sam


Sorry for not replying earlier, but my internet connection has been down
since Tuesday night.  Make sure that you take note of the difference
between the single quotes (' - on the same key as ") and the bakc-tick
(` - on the same key as the ~).

As far as your sources.list, what is the exact error message?

-Roberto

Attachment: signature.asc
Description: OpenPGP digital signature


Reply to: