Difference between revisions of "System Maintenance"

Revamp and merge content from Orphan Package Removal
imported>DeMus
imported>Dalto
(Revamp and merge content from Orphan Package Removal)
Line 1: Line 1:
== General Recommendation ==
__TOC__


=== Quote from Arch Wiki ===
<blockquote>
==== Partial updates/upgrades are unsupported ====


Arch Linux [Manjaro] is a rolling release distribution. That means when new library versions are pushed to the repos, all developers and packagers, rebuild all packages against the libraries. For example, if two packages depend on the same library, upgrading only one package might also upgrade library (as a dependency), which might then break the other package which depends on an older version of the library.
=Overview=


That is why partial upgrades are '''not supported'''. do not use <code> [[pacman]] -Sy [package] </code> or any equivalent such as <code> pacman -Sy </code> followed by <code> pacman -S [package] </code>. '''Always''' upgrade (with <code> pacman -Syu </code>) before installing a package. Be very careful when using <code> IgnorePkg </code> and <code> IgnoreGroup </code> for the same reason. If the system has locally installed packages (such as AUR packages), users will need to rebuild them when their dependencies receive a [https://en.wikipedia.org/wiki/soname soname] bump.
This article contains tips and best practices for keeping your system in optimal condition.


If a partial upgrade scenario has been created, and binaries are broken because they cannot find the libraries they are linked against, do not "fix" the problem simply by symlinking. Libraries receive soname bumps when they are not backwards compatible. A simple <code> pacman -Syu </code> to a properly synced mirror will fix the problem as long as pacman is not broken.


The bash script '''checkupdates''', included with the pacman package, provides a safe way to check for upgrades to installed packages without running a system update at the same time.
=Keeping your System Updated=


==== Act on alerts during an upgrade ====
On a rolling release distribution it is essential to keep your system fully updated. Manjaro provides a few ways to keep your system updated.
When upgrading the system, be sure to pay attention to the alert notices provided by pacman. If any additional actions are required by the user, be sure to take care of them right away. If a pacman alert is confusing, search the forums and the recent news posts for more detailed instructions.


==== Deal promptly with new configuration files ====
* You can use the GUI tool [[Pamac]] directly or via the update notifier
When pacman is invoked, <code> .pacnew </code> and <code> .pacsave </code> files can be created. Pacman provides notice when this happens and users must deal with these files promptly. Users are referred to the Pacman/Pacnew and Pacsave wiki page for detailed instructions.
* You can use the GUI tool [[Octopi]] directly or via the update notifier
* You can use the [[Pamac#Updating_the_System|Pamac CLI]]
* You can use the [[Pacman_Overview#Installing_Updates|Pacman CLI]]


Also, think about other configuration files you may have copied or created. If a package had an example configuration that you copied to your home directory, check to see if a new one has been created.
</blockquote>


== Manjaro Recommendation ==
==Avoiding Partial Updates==
In addition to the above mentioned points, Archlinux has only one branch, '''Manjaro has three'''.


'''Please''' follow these '''Manjaro''' recommendations:
{{warning|Partial updates are not supported under any circumstances}}


* '''No temporary branch changes'''. Do not mix in packages from other branches.
* '''After changes''' to branch and mirror list do a full system update
    sudo pacman -Syyu
* '''Before installing''' new packages do a full system update
    sudo pacman -Syu [some-package-name]
* '''Do not downgrade''' using the pacman downgrade switch (-Suu) unless otherwise instructed from an update announcement.


== Additional information ==
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.  Here are some important rules to help you avoid this dangerous situation.


'''Manjaro Forum'''
* Always ensure your system is fully up-to-date before installing software.
* How bad can it be? [https://forum.manjaro.org/t/temp-unstable-update-crashed-manjaro/43883/ User story]
* Don't downgrade packages, this will always result in a partial update scenario.
* Avoid using {{ic|pacman -Sy}} or {{ic|pacman -Syy}}.  Instead update your database and packages at the same time with {{ic|pacman -Syu}} or {{ic|pacman -Syyu}}
* Don't add packages to pacman's or pamac's ignore list.
* If you just want to check to see what updates are available use the command {{ic|checkupdates}}. It provides a safe way to check for upgrades to installed packages without running a system update at the same time.
* 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.


'''Arch Linux Wiki'''


* [https://wiki.archlinux.org/index.php/System_maintenance#Partial_upgrades_are_unsupported System Maintenance]
=Removing Orphans=
* [https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave Pacman/Pacnew and Pacsave]
 
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.
 
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
 
 
You can also use Pacman to remove orphans as described in [[Pacman_Overview#Viewing_and_Removing_Orphans|this guide]]
 
 
=See Also=
* The Arch Wiki guide on [https://wiki.archlinux.org/index.php/System_maintenance System Maintenance]
* The Arch Wiki guide on [https://wiki.archlinux.org/index.php/Pacman/Pacnew_and_Pacsave Pacnew and Pacsave] files
* The [[Pacman_Overview|Pacman wiki article]]
* The [[Pamac|Pamac wiki article]]




[[Category:Contents Page]]
[[Category:Contents Page]]
[[Category:Software Management]]
Anonymous user