About system maintenance

Hello everyone. I have a couple of questions:

  1. Besides “sudo zypper clean” and “sudo zypper packages --orphaned”, are there any other terminal commands for cleaning up my system?
  2. Can I safely empty the “Temp” folder?
    Thanks in advance for your time.
  1. According to man 8 zypper there is also sudo zypper purge-kernels which will delete the old kernels based on the configuration at /etc/zypp/zypp.conf .
  2. For the tmp folder I quote an openSUSE wiki entry:

Usually application should delete temporary files when they quit or set a expiring date. However, not all applications do it correctly and many files will stay there forever. Operating system and applications will not be broken by removing these files. But you should keep in mind, some running application may have unsaved data stored here. For example, screenshot, office documents, files in downloading progress. Deleting files may interrupt the application and you will lose unsaved data. That’s why you must quit all applications before running this command.

  1. You can have a look at man 1 journalctl. Specifically at --vacuum-time=XX where XX is the time span of log files to keep. For example sudo journalctl --vacuum-time=1w will keep the log files from the last week only.