Checking for Orphan Files or Packages¶
You can use the “orphan-check” tool to resynchronize the filesystem and the database if the filesystem and the database get out of sync.
The system can get out of sync when files in the filesystem are not referenced from the database, or when packages in the database do not have a corresponding file in the filesystem.
The orphan-check tool prints on stdout a list of files on the filesystem that are not referenced from the database:
You can use the –json option if you want a JSON representation of the output:
anaconda-server-orphan-check without arguments is the same as
After you’ve viewed the list of files without references, “orphan-check –clean” can delete them:
You can also check for packages that have missing files:
Then you can delete those file objects from the database:
anaconda-server-orphan-check --reverse --clean