Completely uninstall OCaml

6,502

Try:

sudo apt-get purge ocaml

You also may have to reboot after.

Share:
6,502

Related videos on Youtube

Matthew Piziak
Author by

Matthew Piziak

Software Engineer at Symbiont

Updated on September 18, 2022

Comments

  • Matthew Piziak
    Matthew Piziak almost 2 years

    I want to completely uninstall OCaml so that I can Jane Street's Open Bundle. Using sudo apt-get remove ocaml seemed successful but OCaml is still present on my system (I can run the toploop, etc.) How can I remove it completely?

    apt-file show ../../../usr/bin/ocaml doesn't return anything.

    Solved: I used find . -rexexp '.*ocaml[^/]*/? -exec rm -rf {} \; in the usr directory to remove all ocaml-related files.

    • Suzanne Soy
      Suzanne Soy over 3 years
      Warning: this find command is dangerous, it could remove files containing the name ocaml that are not supplied by the installer (e.g. file type associations which would be provided in bulk for many programs by a packacge which is absolutely not OCaml-specific) or any unrelated file whose name contains that string (some files and directories are named using a hash of something; if those hashes use base32 or base64. then the string ocaml could occur within… unlikely but when you have thousands of such files you could remove a random file without noticing).
  • Matthew Piziak
    Matthew Piziak about 12 years
    apt-get says that the package doesn't exist, but the ocaml command is still there.