# System Cleanup: antiX A small set of commands for routine package maintenance and checking the health of an antiX system. These commands use the standard Debian package management tools available in antiX. --- ## Update Package Lists Refresh the local package information. ```bash sudo apt update ``` This does not upgrade installed packages. It only updates the information used by APT. --- ## Upgrade Installed Packages Install available upgrades for packages already installed on the system. ```bash sudo apt upgrade ``` --- ## Remove Unneeded Packages Remove packages that were installed as dependencies but are no longer required. ```bash sudo apt autoremove ``` Review the proposed removals before confirming. --- ## Clean the Package Cache Remove obsolete package files from the local APT cache. ### Remove obsolete cached packages ```bash sudo apt autoclean ``` `autoclean` removes package files that can no longer be downloaded from the configured repositories. ### Remove the entire package cache ```bash sudo apt clean ``` Use this when disk space is more important than keeping locally cached package files. --- ## Repair Broken Dependencies Ask APT to resolve unfinished or broken package dependencies. ```bash sudo apt --fix-broken install ``` This is useful after an interrupted installation or an incomplete package upgrade. --- ## Check Package Database Look for packages with problems that require attention. ```bash dpkg --audit ``` No output normally means that `dpkg` has not detected an incomplete package state. --- ## Check Held Packages List packages that have been deliberately held back from normal upgrades. ```bash apt-mark showhold ``` An empty result means that no packages are currently held. --- ## Verify Package Dependencies Check whether the installed package system has dependency problems. ```bash sudo apt check ``` This performs a dependency check without changing installed packages. --- ## A Simple Maintenance Pass For routine maintenance, a reasonable sequence is: ```bash sudo apt update sudo apt upgrade sudo apt autoremove sudo apt autoclean sudo apt check ``` The other commands are more useful when diagnosing a particular package-management problem. ### When something is broken A useful diagnostic sequence is: ```bash dpkg --audit apt-mark showhold sudo apt check sudo apt --fix-broken install ``` Then repeat the checks if necessary. --- **Note:** `apt clean` is deliberately not part of the normal maintenance sequence. It removes the entire local package cache and is better treated as a disk-space cleanup operation rather than routine housekeeping.