Force Removing Packages in Ubuntu

Posted by hank, Fri Mar 30 18:18:00 UTC 2007

I couldn’t update tor in Ubuntu because it freaked out when I didn’t have a /var/run/tor directory. Even after creating the directory, it still freaked out. I ended up using the method in this post to fix the problem.

Here’s my resultant /var/lib/dpkg/info/tor.prerm:


#!/bin/sh
set -e
# Automatically added by dh_installinit
#if [ -x "/etc/init.d/tor" ]; then
#  if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
#    invoke-rc.d tor stop || exit $?
#  else
#    /etc/init.d/tor stop || exit $?
#  fi
#fi
# End automatically added section

Just comment it all out and do this:


sudo apt-get remove --force-yes tor

Voila!

Tags:

Comments

  • no avatar available for Ade Ade
    August 18, 2007 @ 07:44 PM

    Thanks so much for this - Ive been trying for two weeks to get tor removed - and thanks to this its now gone

Have your say

A name is required. You may use Markdown in your comments.