This file: http://user.it.uu.se/~embe8573/tut/purge.txt .-----------------------------. : purge mono manually : : ··················· : : by Emanuel Berg : : suggest improvements at : : moasenwood AT zoho DOT eu : : compiled 2018-12-15 : : with help from alt.os.linux : '-----------------------------' Note: Here '#' denotes a comment, not a superuser command. # get all the libmono stuff # the sed comic-book insult is to remove color output $ apt list --installed | grep libmono | sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[m|K]//g" > mono # open the file 'mono' in Emacs (replace-regexp "/.*" "") (replace-regexp "\n" " ") # now we have a single-line, spaced list $ sudo dpkg -P --force-all [the-list] cli-common mono-runtime $ sudo dpkg -P -a # note: this step I had to repeat several times $ sudo apt-get update $ sudo apt-get upgrade > still-mono # open the file 'still-mono' in Emacs # kill manually these lines: Reading package lists... Building dependency tree... Reading state information... You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: # then, to get a list: (replace-regexp " :.*" "") (replace-regexp "Depends:.*" "") (replace-regexp "Recommends:.*" "") (replace-regexp "^ " "") (replace-regexp "^[[:space:]].*$" "") (replace-regexp "^[[:space:]]*$" "") (replace-regexp "^\n" "") (replace-regexp "\n" " ") $ sudo dpkg -P --force all [the-list] $ sudo dpkg -P -a $ sudo apt-get update $ sudo apt-get upgrade # repeat all this until 'sudo apt-get upgrade' no longer complains S sudo apt-get autoremove # one final check $ sudo apt-get update $ sudo apt-get upgrade