Difference between revisions of "System Maintenance"
Views
Actions
Namespaces
Variants
Tools
Clean and reorganize.
imported>Cscs (Home Cache Maintenance) |
imported>Cscs (Clean and reorganize.) |
||
Line 7: | Line 7: | ||
=Keeping your System Updated= | =Home Cache= | ||
The hidden {{ic|.cache}} folder in your home directory is used by many parts of your system. This includes downloads, thumbnails, desktop resources, and more.<br /> | |||
While it is generally safe to remove everything in your {{ic|~/.cache}} folder, it may be more advisable to inspect its contents and selectively remove items instead.<br /> | |||
To generate a sorted list of contents and sizes: | |||
du -sh ~/.cache/* | sort -h | |||
=Journal Log= | |||
The journal keeps logs of system activity. This can be important for troubleshooting, but sometimes the log size can grow rather large. | |||
To report the current size: | |||
journalctl --disk-usage | |||
To remove all but the most recent entries by size or time: | |||
journalctl --vacuum-size=50M | |||
journalctl --vacuum-time=2weeks | |||
To set a maximum size for the journal you can uncomment and edit the following line in {{ic|/etc/systemd/journald.conf}}: | |||
SystemMaxUse=50M | |||
=Packages and Updates= | |||
==Keeping your System Updated== | |||
On a rolling release distribution it is essential to keep your system fully updated. Manjaro provides a few ways to keep your system updated. | On a rolling release distribution it is essential to keep your system fully updated. Manjaro provides a few ways to keep your system updated. | ||
Line 15: | Line 40: | ||
* You can use the [[Pamac#Updating_the_System|Pamac CLI]] | * You can use the [[Pamac#Updating_the_System|Pamac CLI]] | ||
* You can use the [[Pacman_Overview#Installing_Updates|Pacman CLI]] | * You can use the [[Pacman_Overview#Installing_Updates|Pacman CLI]] | ||
==Avoiding Partial Updates== | ==Avoiding Partial Updates== | ||
Line 21: | Line 45: | ||
{{warning|Partial updates are not supported under any circumstances}} | {{warning|Partial updates are not supported under any circumstances}} | ||
It is of critical importance to ensure you don't end up in a state where your system is partially upgraded.<br /> | |||
It is of critical importance to ensure you don't end up in a state where your system is partially upgraded. | It is not uncommon for systems in partially updated state to end up in a critical failure state.<br /> | ||
Here are some important rules to help you avoid this dangerous situation. | |||
* Always ensure your system is fully up-to-date before installing software. | * Always ensure your system is fully up-to-date before installing software. | ||
Line 31: | Line 56: | ||
* When [[Switching_Branches|switching branches]] or [[Pacman-mirrors|switching mirrors]] always use {{ic|pamac update --force-refresh}} or {{ic|pacman -Syyu}} to ensure that the databases for your new mirrors are being used. | * When [[Switching_Branches|switching branches]] or [[Pacman-mirrors|switching mirrors]] always use {{ic|pamac update --force-refresh}} or {{ic|pacman -Syyu}} to ensure that the databases for your new mirrors are being used. | ||
=Removing Orphans= | ==Removing Orphans== | ||
As packages are added, built and removed it is not uncommon to have unneeded dependencies, also called orphans, building up over time. While orphans are not harmful, they take up space on the disk and consume network bandwidth as they are continually updated. Luckily, there are a couple of easy ways to view and remove orphans. | As packages are added, built and removed it is not uncommon to have unneeded dependencies, also called orphans, building up over time. While orphans are not harmful, they take up space on the disk and consume network bandwidth as they are continually updated. Luckily, there are a couple of easy ways to view and remove orphans. | ||
Line 37: | Line 62: | ||
The Pamac article has a section on [[Pamac#Dealing_with_Orphaned_Packages|dealing with orphans]]. A simple command to locate and remove orphans is: | The Pamac article has a section on [[Pamac#Dealing_with_Orphaned_Packages|dealing with orphans]]. A simple command to locate and remove orphans is: | ||
pamac remove -o | pamac remove -o | ||
You can also use Pacman to remove orphans as described in [[Pacman_Overview#Viewing_and_Removing_Orphans|this guide]] | You can also use Pacman to remove orphans as described in [[Pacman_Overview#Viewing_and_Removing_Orphans|this guide]] | ||
==Pacnew and Pacsave files== | |||
= | |||
A .pacnew file may be created during a package upgrade to avoid overwriting a file which already exists. A .pacsave file may be created during a package removal, or by a package installation of a package that was removed. These files require manual intervention from the user and it is good practice to handle them regularly. The program {{ic|pacdiff}} can help manage this process. For example, here is what it looks like when the {{ic|/etc/default/grub}} grub file has changed: | A .pacnew file may be created during a package upgrade to avoid overwriting a file which already exists. A .pacsave file may be created during a package removal, or by a package installation of a package that was removed. These files require manual intervention from the user and it is good practice to handle them regularly. The program {{ic|pacdiff}} can help manage this process. For example, here is what it looks like when the {{ic|/etc/default/grub}} grub file has changed: | ||
Line 48: | Line 71: | ||
==> pacnew file found for /etc/default/grub | ==> pacnew file found for /etc/default/grub | ||
:: (V)iew, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/s/r/o/q] | :: (V)iew, (S)kip, (R)emove pacnew, (O)verwrite with pacnew, (Q)uit: [v/s/r/o/q] | ||
* {{ic|V}} shows the differences between the two files | * {{ic|V}} shows the differences between the two files | ||
Line 55: | Line 77: | ||
* {{ic|O}} overwrites the existing file with the new file | * {{ic|O}} overwrites the existing file with the new file | ||
* {{ic|Q}} quits the process without making further changes | * {{ic|Q}} quits the process without making further changes | ||
Unfortunately, there is no perfect road map for how to deal with these files. If you keep the original config file, and the syntax has changed, the program may stop working or fail to use the existing config. If you remove the original file and use the new file without any changes, all your configuration settings can be overwritten. Sometimes, you need to combine pieces from the new and old files to make everything to work. In these situations it is better to integrate the files manually. | Unfortunately, there is no perfect road map for how to deal with these files. If you keep the original config file, and the syntax has changed, the program may stop working or fail to use the existing config. If you remove the original file and use the new file without any changes, all your configuration settings can be overwritten. Sometimes, you need to combine pieces from the new and old files to make everything to work. In these situations it is better to integrate the files manually. | ||
For more detailed information, please see review the Arch Wiki [[#See_Also|linked below]]. | For more detailed information, please see review the Arch Wiki [[#See_Also|linked below]]. | ||
= | =Time and Date= | ||
[[File:Msm-time-date.png|thumb|left|350px]] | [[File:Msm-time-date.png|thumb|left|350px]] | ||
Keeping the system time accurate may seem unimportant but certain network related services may malfunction if the time is out of sync. | |||
The easiest way to ensure the time is being properly synchronized is the GUI tool included in '''Manjaro Settings Manager''' which is pictured to the left. Simply check the box next to "Set time and date automatically". | |||
The easiest way to ensure the time is being properly synchronized is the GUI tool included in '''Manjaro Settings Manager''' which is pictured to the left. | |||
An alternative is to use systemd via the systemd-timesyncd service. | An alternative is to use systemd via the systemd-timesyncd service. This can be easily enabled with the command: | ||
timedatectl set-ntp true | |||
<div style="clear: both"></div> | <div style="clear: both"></div> | ||