Welcome to OCS Inventory NG community support, where you can ask questions and receive answers from other members of the community.

Please ask questions only in English or French.

Release 2.12.3 available

The official documentation can be found on https://wiki.ocsinventory-ng.org. Read it before asking your question.

Removed packages still showing up in inventory

Debian packages that have been removed (rc) still show up in inventory.

Running strace on the ocsinventory-agent it shows that the software inventory collection is done using the command stat (e.g. "stat("/var/lib/dpkg/info/exim4-base.list", {st_mode=S_IFREG|0644, st_size=155, ...}) = 0" ) which catches software installed as well as removed, but not purged from a system.

I consider this a bug as it shouldn't inventory removed packages.
in OCS Inventory NG agent for Unix by (180 points)

4 Answers

0 votes
What version of the agent are you running? This doesn't appear to be an issue with v2.10, however I was able to replicate with v2.4. Hope this helps.
by (150 points)
0 votes

Debian packages with 'rc' are still inside the system : cf 'dpkg -l'.

The best is to remove totally packages : may be

apt-get remove --purge $(dpkg -l | awk '/^rc/{print $2}')
by (20.1k points)
+1 vote
@jacquesh I know how to totally purge packages, but that's not the point.
The issue is that ocs-inventory is supposed to show what packages ARE installed on a system, not what packages ARE installed + packages that have been installed, later removed, but not purged.

I think ocs should use the command below to obtain the proper inventory of only INSTALLED packages:

dpkg -l | grep ^ii
by (180 points)
0 votes
The question is 'how agent ask about debian packages ?'

If agent ask using 'dpkg -l' without 'grep -v "^rc', it's get all packages.

But, keep in mind, usually you don't have 'rc' packages ...
by (20.1k points)
 
Powered by Question2Answer
...