Topic: Cleaning up ocsinventory installations

Hi,
I have been a little careless, and I have a number of machines that now have more than one ocs install :-(. On one I have the old linux client, 1.0.1 of the unix agent and now 1.1.2 from epel. I tried doing a make uninstall on one machine but it just said it was dangerous and did nothing. We didn't originally want to install stuff from epel but it's just too annoying installing and maintaining things manually! Does anyone have any advice?
We could just leave the old versions installed and remove the cron jobs but unfortunately the rpm version installed doesn't work. It seems to be because Ocsinventory is installed into perl in a different place by the two systems, and so I get:

Undefined subroutine &Ocsinventory::Agent::run called at (eval 20) line 1.

The different locations in perl are:

/usr/lib/perl5/site_perl/5.8.8/Ocsinventory/
and
/usr/lib/perl5/vendor_perl/5.8.8/Ocsinventory

Can any suggest a way to move forward?
Thanks
Anton

Re: Cleaning up ocsinventory installations

Remove the folder which is not own by the RPM (site_perl).

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Cleaning up ocsinventory installations

De mémoire, il faut aussi virer le fichier /usr/bin/ocsinventory-agent (c'est celui dans sbin qu'il faut garder)

Laptop:  Fedora 38 + rpmfusion + remi (SCL only)
x86_64 builder: Fedora 39 + rpmfusion + remi-test
aarch64 builder: RHEL 9 with EPEL
Hosting Server: CentOS 8 Stream with EPEL, rpmfusion, remi

Re: Cleaning up ocsinventory installations

Super merci !
And what Rémi said in English for those who don't speak French :-)
"From memory you also need to remove the file /usr/bin/ocsinventory-agent (you need to keep the one in sbin)."
And I can confirm that there is indeed a file /usr/bin/ocsinventory-agent, so your memory serves you well!
Cheers
Anton