[solved] Uninstall compiled FreeCAD in Linux

Here's the place for discussion related to coding in FreeCAD, C++ or Python. Design, interfaces and structures.
Forum rules
Be nice to others! Respect the FreeCAD code of conduct!
Post Reply
catman
Posts: 412
Joined: Fri Jan 11, 2019 10:42 pm

[solved] Uninstall compiled FreeCAD in Linux

Post by catman »

Probably a very trivial question but I failed to find a solution on the wiki or in this forum.

I downloaded and compiled a modified FreeCAD source with

Code: Select all

 mkdir buld && cd build
 cmake .. && make
 sudo make install
The code installs to /usr/local/* and it works fine with the same settings than my installed AppImage.

Now I want to clean up and uninstall it again. I expected something like

Code: Select all

 sudo make uninstall
which did not work. I did not see another target for that.

How do I unstall a self-compiled FreeCAD from /usr/local/*?
Last edited by catman on Sun Aug 14, 2022 11:52 am, edited 1 time in total.
User avatar
jnxd
Posts: 951
Joined: Mon Mar 30, 2015 2:30 pm
Contact:

Re: uninstall compiled FreeCAD in Linux

Post by jnxd »

Could you try any of the answers from this: https://stackoverflow.com/questions/143 ... rary-in-li? Fair warning I haven't tried it myself.

In the future you can set an "install prefix" in cmake (-DCMAKE_INSTALL_PREFIX) to tell make to install it there instead of in usr.
My latest (or last) project: B-spline Construction Project.
wmayer
Founder
Posts: 20241
Joined: Thu Feb 19, 2009 10:32 am
Contact:

Re: uninstall compiled FreeCAD in Linux

Post by wmayer »

catman wrote: Fri Aug 12, 2022 9:20 am How do I unstall a self-compiled FreeCAD from /usr/local/*?
https://stackoverflow.com/questions/414 ... -uninstall
https://gitlab.kitware.com/cmake/commun ... with-cmake

The suggested method is to run

Code: Select all

xargs rm < install_manifest.txt
catman
Posts: 412
Joined: Fri Jan 11, 2019 10:42 pm

Re: uninstall compiled FreeCAD in Linux

Post by catman »

jnxd wrote: Sun Aug 14, 2022 2:06 am Could you try any of the answers from this: https://stackoverflow.com/questions/143 ... rary-in-li?
wmayer wrote: Sun Aug 14, 2022 8:42 am The suggested method is to run

Code: Select all

xargs rm < install_manifest.txt
Excellent. Thanks for your answers and also the links for further reading.

I needed sudo to remove the parts from the /usr/local.

Code: Select all

xargs sudo rm < install_manifest.txt

But in your links was another gem: "checkinstall" makes a *.deb package from the built sources. Its an interactive script. Its great to distribute a local version for testing. Here is the use on Ubunut 22.04

Code: Select all

 sudo apt install checkinstall                             # do once, if not installed
  cd ~/temp/freecad-master/build                     # or whereever the sources are
  cmake ..
  make
  sudo checkinstall                                                     # interactive
It asked a few questions and required to add some description. Default was OK for me, except I should have set a "Name" for the package, because thats needed to uninstall it again. The default name is "build".
I used this to install/uninstall it. The installation also went to /usr/local.

Code: Select all

  sudo dpkg -i build_22020814-1_amd64.deb     # install
  sudo dpkg -r build                                             # remove
it takes a couple of minutes to build the package, because its single CPU only. Maybe there is a multi-CPU switch, but I did not find it.
Post Reply