I accidently delete some files in /usr/lib64 of Leap15.4

Could you please give me some suggestions about how to reinstall the file in the /usr/lib64 directory.
need I to re-install the system?

You could run rpm -Va and check output for missing files under /usr/lib64, then reinstall these packages.


You can count the number of commands, Bash, Built, Keywords and Functions of the system.

To know the availability you could use the Compgan -abcka command;
Where C are commands, A Son Bash and aka, B Som Builts, K Son Keywords; From the list you can compare with that of other companions.
With compegen you can list according to what you need and how are many, you can redire They compete, there may be the psibility that they use more or less the same, or in any case look for the differences that are less and add them).
Example of redicirion: Comment -abck> /home/user/bien/lista.txt:

Example of List.txt:

Anyway you have a list of all commands, applications, binary, etc …
As the list is large, if you do it before adding the RPM of Lib64, it can be used to compare.



Thanks. but the system can’t run the basic command now , such as ‘rpm cp zypper…’
what should i do.

The obvious is to restore from a recent backup. But that’s a problem if you don’t have a recent backup.

If you are using “btrfs”, then maybe you can try booting from an older snapshot and see if the missing files are there. If they are, then restore that snapshot.

If all else fails, the simplest might be to use boot your install media and do an upgrade to leap 15.4. That should reinstall whatever is needed. And it should preserve “/home”

The rpm, I know there is another way to do it, when I have to execute an rpm, in my case I place myself on the file and with the right mouse button, I choose to open with yast software installed and uninstaller, and that works for me , even for the drivers, despite the fact that they are not certified or by any repository (due to lack of keys), it is used to install, it is done with yast and when it gets there and warns that the certificate is missing, it is ignored and installs the drivers correctly ( they are functional, example epson, brother, etc, despite the error they work)
Another as the moderator says, with a boot snapper, snapper list, from the list look for a boot that is prior to the failure, I have to install that: snapper rollback Number of snaphots: example snapper rollback 120 (it is an example, it does not indicate that this going to work, it has to be with your configuration.

Another method is to rewrite the root, if you format /home, in this way you restore the system and you don’t lose the programs:

You need original repositories, use the same name, pass, session name etc; and something very important DO NOT FORMAT THE HOME.


I hope this is not what you wanted to type. When you “format” /home, all user data will be lost.

You probably wanted to say something like: when you re-install the system, do not “format” /home, so all user data will be kept. But that only works if you have a separate file system for /home.

Well at the end you say “DO NOT FORMAT THE HOME”, but it is all a bit contradictory and confusing.

If you do, you lose all user information, thanks for correcting me.

You can do many things, but never format /home.
If you overwrite root, you have a new system keeping /home, but missing some programs.
Now if you upgrade, you keep /home and programs.
Greetings and sorry for the mistake (I did not know that I had put that, since it seems illogical to me).