When i reinstall a sofware via command line

I guess you are using an SD card to boot your system? Unfortunately, SD cards are not designed to run on 24/7 systems, and they have a potential to corrupt or damage data. If possible, try to boot from a USB pen stick, HDD or SSD. As well, ensure all your attached USB HDD have an own power supply (or at least a powered USB hub) and not just get powered by the RPi itself. Because RPI USB ports are not designed to provide enough power to operate HDD’s. It might goanna work for a while but could lead to data inconsistence eventually.