How to use the command 'aurman' (with examples)
- Linux
- December 25, 2023
‘aurman’ is a utility for Arch Linux that allows users to build and install packages from the Arch User Repository (AUR). It is similar to the ‘pacman’ command, but specifically designed for AUR packages. The ‘aurman’ command provides various options to synchronize and update packages, install new packages, search the package database, and remove packages along with their dependencies.
Use case 1: Synchronize and update all packages
Code:
aurman --sync --refresh --sysupgrade
Motivation: This use case is helpful when you want to update all the packages installed on your Arch Linux system, including both official repositories and AUR packages.
Explanation:
--sync
: Synchronizes the package databases.--refresh
: Refreshes the package databases before upgrading.--sysupgrade
: Upgrades all installed packages to the latest version.
Example output: The command will display the progress of synchronization and updating, showing which packages are being upgraded.
Use case 2: Synchronize and update all packages without showing changes of PKGBUILD
files
Code:
aurman --sync --refresh --sysupgrade --noedit
Motivation: Sometimes, it is not necessary to display the changes in the ‘PKGBUILD’ files while synchronizing and updating packages. Using the --noedit
option will skip displaying this information.
Explanation:
--noedit
: Skips the display of changes inPKGBUILD
files.
Example output: The command will display the progress of synchronization and updating, but will not show the changes in PKGBUILD
files.
Use case 3: Install a new package
Code:
aurman --sync package
Motivation: When you want to install a package from the AUR, the ‘aurman’ command allows you to easily synchronize and install the package.
Explanation:
--sync
: Synchronizes the package databases.package
: The name of the package to be installed.
Example output: The command will display the progress of synchronization, and then prompt for confirmation before installing the package.
Use case 4: Install a new package without showing changes of PKGBUILD
files
Code:
aurman --sync --noedit package
Motivation: Similar to the previous use case, if you do not want to see the changes in ‘PKGBUILD’ files during the installation of a package, you can use the --noedit
option.
Explanation:
--noedit
: Skips the display of changes inPKGBUILD
files.
Example output: The command will display the progress of synchronization and installation, but will not show the changes in PKGBUILD
files.
Use case 5: Install a new package without prompting
Code:
aurman --sync --noedit --noconfirm package
Motivation: This use case is helpful when you want to install a package without any prompts or confirmations. It is useful for scripting or automating package installation processes.
Explanation:
--noedit
: Skips the display of changes inPKGBUILD
files.--noconfirm
: Skips the confirmation prompt during package installation.
Example output: The command will display the progress of synchronization and installation, and directly install the package without any prompts or confirmations.
Use case 6: Search the package database for a keyword
Code:
aurman --sync --search keyword
Motivation: When you are looking for a particular package or need to find packages related to a specific keyword, you can use the ‘aurman’ command to search the package database in both the official repositories and AUR.
Explanation:
--sync
: Synchronizes the package databases.--search <keyword>
: Searches the package database for the given keyword.
Example output: The command will display a list of packages that match the entered keyword, including both official repository and AUR packages.
Use case 7: Remove a package and its dependencies
Code:
aurman --remove --recursive --nosave package
Motivation: When you want to remove a package along with its dependencies, the ‘aurman’ command allows you to easily remove them using the --remove
and --recursive
options.
Explanation:
--remove
: Removes the specified package.--recursive
: Removes all dependencies of the package as well.--nosave
: Does not save the package in the user’s package list.
Example output: The command will display the progress of removing the package and its dependencies, and prompt for confirmation before removing each of them.
Use case 8: Clear the package cache
Code:
aurman --sync --clean
Motivation: Over time, the package cache can take up a significant amount of disk space. This use case allows you to clear the package cache, freeing up storage space on your system.
Explanation:
--sync
: Synchronizes the package databases.--clean
: Cleans the package cache.
Example output: The command will display the progress of cleaning the package cache, removing any outdated package files stored in the cache.