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.