0

I tried to update texlive from 2013 version to 2016 version (through adding the ppa ppa:jonathonf/texlive-2016. This failed, and I tried to revert the changes (purging texlive, to begin all over), and am now stuck. Trying to install/remove/update anything results in unmet dependencies messages, and it tries to remove the package context, but fails. Running apt-get -f install yields the following:

Removing context (2016.05.17.20160523-1~ubuntu14.04.1york0) ...
unknown option: format
dpkg: error processing package context (--remove):
 subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
 context
E: Sub-process /usr/bin/dpkg returned an error code (1)

I've tried using --force-yes remove and tried forcing a purge with dpkg without any luck.

Edit (in response to "marked as duplicate": It might be related to Remove broken PPA package with unknown option, as it's about the context package and actually mentions fiddling with the postrm script. It is not the same as How do I resolve unmet dependencies after adding a PPA?. None of the answers provided any solution. The solution I found might be added to that topic, though.

Adrian
  • 29

1 Answers1

2

I resolved my issue by removing the context.postrm file (which I located by)

sudo updatadb
locate context.post

I don't know precisely what is done/not done by this postremoval script, but removing it seemed to resolve the issue. If anyone can clarify/enlighten me on this, I'd be grateful.

Adrian
  • 29
  • Interesting, how did you come up to this solution? Dis you read it somewhere? Id like to check it out – M. Becerra Jan 27 '17 at 11:46
  • I came up with it because I saw somewhere among the many discussions I looked through mentioning fiddling with .postinst scripts. I must sadly admit that I can't recall (and can't find) the actual post(s) that mentioned it. It seems that the answer in http://askubuntu.com/questions/816314/remove-broken-ppa-package-with-unknown-option is related, and might have solved my issue, though I didn't come across it until now. – Adrian Jan 28 '17 at 12:11