4

When I remove packages from my system with APT-based programs, they often leave behind some kind of residue (referred to as "residual config") that seems to serve no purpose other than annoying me. Cleaning these is normally quite trivial: just purge them in Synaptic or run aptitude purge '?config-files'.

Some packages are more persistent. Purging them with Synaptic returns the message "ignoring request to remove [package] which is not installed" and Aptitude does likewise, also using the words "not installed". I want a way to remove these unusually persistent packages.

Specific examples of this behavior: a previous Ubuntu setup did this with fglrx and fglrx-updates, depending on with one I had installed. My current Mint 14 install is doing it with libav-tools, which I replaced with ffmpeg from the official Launchpad PPA. I think that I have had this problem with other packages too, but I don't remember specifically. I don't know what they have in common, unless they share a bug in the package design and their maintainers just need to use lintian.

Bonus points for a solution that uses Synaptic.

2
  • What package state are you refering to? The tools (dpkg or apt) only know c (config files present but nothing else, i.e. the result of removing) and p (no trace of the package, the result of purging). What does dpkg -l report on these packages? Commented Jun 2, 2013 at 22:12
  • I've never used this function of dpkg before, but I think the data you're referring to is the "rc" at the beginning of the line. I take this to mean "removed, except for config", despite purging it with various programs. While looking at the man page I learned to dpkg -L, which says one etc/avserver.conf is still around. I think this is the main problem.
    – Wutaz
    Commented Jun 3, 2013 at 2:16

2 Answers 2

3

This should do the job:

dpkg --purge $PACKAGE
7
  • dpkg: warning: ignoring request to remove libav-utils which isn't installed
    – Wutaz
    Commented Jun 3, 2013 at 2:17
  • @Wutaz If you get that message, then the package is already purged (un in the dpkg -l output). There are no config files left around. What makes you think libav-utils is still around? Commented Jun 3, 2013 at 8:55
  • The fact that it is. Please read my relevant comment instead of ignoring it.
    – Wutaz
    Commented Jun 3, 2013 at 19:22
  • @Wutaz sorry I looked at your comment and don't understand it. If it is purged no configuration files are left behind. In the normal case, files marked as configuration are left on the system. Commented Jun 3, 2013 at 20:23
  • That's why I'm asking this question: there's a glitch. Purging is an action. Just because it didn't work doesn't mean it never happened.
    – Wutaz
    Commented Jun 3, 2013 at 20:30
3

Okay, I was able to find my own solution (ironically) because Gilles wasn't explaining himself properly and making me research his cryptic comments.

Step 1: use dpkg -L $package or Synaptic's Properties dialog to find the file that didn't get purged with the rest of the package. I don't know why a file might not be purged properly, but that's what causes this problem. In my case it was /etc/avserver.conf.

Step 2: install the offending package. This way the package manager will think it fixed the problem itself.

Step 3: run sudo rm $offendingfile to delete the file that the package manager doesn't want to.

Step 4: purge the package again. All package managers will recognize that nothing remains, because everything really is gone this time.

Except for that one rm, this works with Synaptic, so I can give myself those bonus points.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .