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

Re: How can I recover from a broken package?



on Tue, May 06, 2003 at 07:41:50PM -0400, stan (stanb@awod.com) wrote:
> I'm getting pretty desperate here. Yesterday on a new laptop, I tried to
> install the laptop-net package. It appears that tis package has a broken
> script of some kind. As a result I am unable to do _anything_ that involves
> package managment.
> 
> At this point in  time, all I wnat to do is remove all traces of this
> package. I've tried lot's of things including:
> 
> apt-get --purge remove  --force-yes laptop-net
> 
> without success. 
> 
> Please help. What can I do to jsut remove all traces of this package?

Post the command you're running ***AND*** the output produced.  For
***BOTH*** the installation ***AND*** the removal attempts.

Many broken install scripts can be fixed with minor tweakage.  If the package
is truly broken, you should file a bug against it.


If you need to manually remove a package, you might try the following
(untested):

   - List all files it.  If it's not installed, you want to get a
     listing of files from the DEB itself.  This should be on your
     installation media (if installing from CDROM) or in
     /var/cache/apt/archives (if you install from an Internet archive).
     The following command will list these:

     # ar -p <package> data.tar.gz | tar tzvf - | awk '{print $6}'

   - Delete these files.  You can do this by running the above command
     and using it to run your 'rm' command:

     # cd /
     # rm $( -p /var/cache/apt/archives/foo.deb data.tar.gz |
	 tar tzvf - | awk '{print $6}' )

   - Copy /var/lib/dpkg/status, say to /root/status.$( date +%Y%m%d ),
     as a backup.

   - Edit /var/lib/dpkg/status.  Find the line beginning 

       '^Package: laptop-net'

     Delete the lines that follow, up to, and including, the first
     following blank line.  Save the file.

   - If your package state is garbled, copy the backup copy of your
     status file back.  Note that Debian keeps *several* copies of your
     status file, as status-old in the same directory, and in
     /var/backups.  If necessary, you can recover package state from
     elsewhere, such as /usr/share/doc/*, which largely corresponds to
     your currently installed packages.

I'd appreciate anyone's considered comments on anything I may have
missed here.



BTW:  general tips on reporting problems:

I'd very strongly recommend you read the following excellent essay by
Simon Tatham, "How to Report Bugs Effectively":

    http://www.chiark.greenend.org.uk/~sgtatham/bugs.html


Eric S. Raymond and Rick Moen's essay "How To Ask Questions The Smart
Way" is is also good:

    http://www.catb.org/~esr/faqs/smart-questions.html


Please note that you are the person in the best position to know what
you're trying to do, what you've done, how the system's responded, and
generally how it's configured.  It's very helpful if you can post:

  - *Exact* commands or steps tried.
  - *Exact* error output or log messages.

Often, entering the error messages into a good search engine such as
Google (http://www.google.com/) will help set you on the road to
resolving your problems.

While others can offer suggestions, guidance, and experience, we cannot
see into either your mind or your machine's state.  This is very much a
case of "you have to help us help you".

Thank you.

Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    DON'T PANIC



Reply to: