-1

The problem is that I installed a .deb file, and when I tried getting rid of it with dpkg -r ..., dpkg claimed to have removed it. Nevertheless, I can type in the "removed" command, and it still works.

I need to get it off, because I realized what I needed was a larger program that included it. When I try to run make on the larger program, it attempts to use the smaller with different options (the larger appears to be assuming a later version of the smaller).

Anyway, it's just weird that I can't get rid of it. I've re-installed and tried using the purge option, tried apt-get clean, tried restarting the machine, etc.

Any ideas would be appreciated. Thanks!

Josh Cason
  • 528
  • 5
  • 9
  • 1
    If everything else fails, perhaps delete the executable manually. –  Mar 02 '13 at 20:10
  • ok, thanks. I thought of that, but I wasn't sure whether that would leave the command name - or if that would even be a problem :) – Josh Cason Mar 02 '13 at 20:12
  • There aren't "command names". There are executable files in the search paths of the shell which aren't executed if nonexistent (obviously). –  Mar 02 '13 at 20:14
  • ahh, cool. Wasn't sure how that worked. It worked! Thanks a lot. – Josh Cason Mar 02 '13 at 20:17
  • But now I have a different problem, see the comments under Srdjan's answer. – Josh Cason Mar 02 '13 at 21:18

3 Answers3

1

Try this:

rm /var/lib/dpkg/info/program.*
dpkg --remove --force-remove-reinstreq program

Replace 'program' with the one you want to remove.

chelahmy
  • 114
  • 1
  • 3
0

Thanks H2CO3: "If everything else fails, perhaps delete the executable manually.... executable files [are] in the search paths of the shell which aren't executed if nonexistent"

rm `which flop`

flop is the name of the program.

Josh Cason
  • 528
  • 5
  • 9
0

WARNING!!!: Do this only if you know that the package does not do anything crazy with the filesystem!

Download but don't install the debian package. Then run

$ touch clean_up.sh
$ chmod +X clean_up.sh
$ gedit clean_up.sh

In the file add the following:

#!/bin/bash

all=$(dpkg -c steam*deb | awk '{print $6}')
for item in $all; do
  #echo "Checking $item"
  item=$(echo $item | sed 's/^\.//g')
  if [[ -d ${item} ]]; then
    #echo "-is a directory. Skipping"
    continue
  fi
  echo "Removing file ${item}"
  sudo rm -f ${item}
done

Afterwards, save and exit gedit and run:

./clean_up.sh

which will remove all the files it statically drops on your system.

Srdjan Grubor
  • 2,605
  • 15
  • 17
  • To remove the small executable, you could also run sudo rm -f $(which smaller_program_name) though again, be careful with this command – Srdjan Grubor Mar 02 '13 at 20:27
  • ok, I actually ran `rm \`which flop\`` but when I try to reinstall the version I want with apt-get, it installs. But then I get: `$ flop` `bash: /usr/local/bin/flop: No such file or directory` – Josh Cason Mar 02 '13 at 21:14
  • It's possible that the package you thought installed flop was not doing that but maybe one of its dependencies. I'd look for the list of dependencies to see if any of them contain /usr/local/bin/flop – Srdjan Grubor Mar 02 '13 at 21:38
  • Thank you, that doesn't appear to be it though. – Josh Cason Mar 02 '13 at 22:43
  • Ahh, I see. The new package installs it to /usr/bin/ rather than /usr/local/bin/. I must have removed a sym link instead of a binary earlier. thanks all! – Josh Cason Mar 02 '13 at 22:45