Forrest logo
tool overview
On this page you find all important commands for the CLI tool paccache. If the command you are looking for is missing please ask our AI.

paccache

Paccache is a command line tool used in Arch Linux and its derivatives to clean the package cache. The package cache is a collection of downloaded packages used by the package manager for installation or updates. Paccache helps to manage this cache by removing old or unused packages.

When executed without any options, paccache removes all but the three most recent versions of each package in the cache directory. It frees up disk space by deleting unnecessary old package versions that are no longer required. However, it never removes the currently installed version or the immediately previous version of a package.

Paccache also allows customization through various command line options. For example, the -r option removes all versions of uninstalled packages instead of keeping the latest three. It can also be used with the -k option to keep a certain number of versions for a package, overriding the default value of three.

In addition to cleaning the package cache, paccache can also display a summary of the disk space usage within the cache directory. This helps users identify the space occupied by packages and make informed decisions on what to remove.

Overall, paccache simplifies package cache management in Arch Linux, helping to maintain a healthy system and optimize disk space.

List of commands for paccache:

  • paccache:tldr:517ce paccache: Set the number of package versions to keep.
    $ paccache -rk ${num_versions}
    try on your machine
    explain this command
  • paccache:tldr:8b936 paccache: Move candidate packages to a directory instead of deleting them.
    $ paccache -m ${path-to-directory}
    try on your machine
    explain this command
  • paccache:tldr:8eb22 paccache: Remove all but the 3 most recent package versions from the pacman cache.
    $ paccache -r
    try on your machine
    explain this command
  • paccache:tldr:b9068 paccache: Perform a dry-run and show the number of candidate packages for deletion.
    $ paccache -d
    try on your machine
    explain this command
tool overview