How to use the command 'wajig' (with examples)
- Linux
- December 17, 2024
Wajig is a versatile and comprehensive system support tool designed for Debian-based operating systems. This command-line utility simplifies and consolidates several package management operations into a single interface, making it an efficient tool for both novice users and experienced administrators. The command aims to streamline tasks such as updating packages, removing software, managing dependencies, and more, which can be cumbersome when dealing with multiple standalone tools.
Use case 1: Update the list of available packages and versions
Code:
wajig update
Motivation:
The package list update is a fundamental operation in maintaining a healthy Debian-based system. By regularly executing this command, users ensure they are aware of the latest packages and any updates provided in the repositories. This command synchronizes your local package index with the online sources.
Explanation:
wajig
: The base command for the Wajig tool.update
: Sub-command that refreshes the package list from configured repositories.
Example Output:
Hit:1 http://deb.debian.org/debian stable InRelease
Get:2 http://security.debian.org/debian-security stable/updates InRelease [65.4 kB]
Fetched 130 kB in 1s (130 kB/s)
Reading package lists... Done
Use case 2: Install a package, or update it to the latest available version
Code:
wajig install package
Motivation:
Installing new software or ensuring your existing applications are updated is crucial for performance, security, and accessing new features. The install
command manages package installations adeptly, handling dependencies directly.
Explanation:
wajig
: The main command for executing Wajig functions.install
: Command used to request the installation or upgrade of a package.package
: Placeholder for the actual name of the package you wish to install or update.
Example Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
package
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 500 kB of archives.
After this operation, 2 MB of additional disk space will be used.
Do you want to continue? [Y/n]
Use case 3: Remove a package and its configuration files
Code:
wajig purge package
Motivation:
Sometimes, removing packages along with their configuration files is necessary to ensure a clean system environment, especially when you no longer use the software or want to perform a fresh installation.
Explanation:
wajig
: Represents the unified command-line tool.purge
: Sub-command specific for removal of a package along with its complete configuration data.package
: The specific package name that you intend to remove entirely from the system.
Example Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
package*
0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded.
After this operation, 500 kB disk space will be freed.
Do you want to continue? [Y/n]
Use case 4: Perform an update and then a dist-upgrade
Code:
wajig daily-upgrade
Motivation:
The daily-upgrade
is proficient in ensuring the system is up to date, accommodating not just security patches but potentially newer software versions that involve dependency changes. It is ideal for routines in system maintenance.
Explanation:
wajig
: Core tool for package management tasks.daily-upgrade
: A combination operation that initiates an update of the package list followed by a distribution upgrade.
Example Output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages will be upgraded:
package1 package2
2 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 2 MB of archives.
Do you want to continue? [Y/n]
Use case 5: Display the sizes of installed packages
Code:
wajig sizes
Motivation:
Understanding the disk space usage by packages is vital for effective disk management, especially on systems with limited storage capacity. This command is instrumental in evaluating which packages are consuming substantial space.
Explanation:
wajig
: The versatile system command interface.sizes
: The specific command to list all installed packages with their respective sizes.
Example Output:
123 MB linux-image-generic
45 MB firefox
12 MB libreoffice-common
...
Use case 6: List the version and distribution for all installed packages
Code:
wajig versions
Motivation:
Package version information can be critical for troubleshooting, compliance, or ensuring compatibility across various systems. The versions
command succinctly presents data about installed packages.
Explanation:
wajig
: The command-line utility for package management.versions
: A command argument to display installed package details comprising their versions and applicable distributions.
Example Output:
firefox: 90.0.2-1ubuntu1 (focal)
linux-image-generic: 5.11.0.27.28 (hirsute)
...
Use case 7: List versions of upgradable packages
Code:
wajig toupgrade
Motivation:
For users managing multiple systems or those cautious about changes, it is important to know which packages have updates available before making adjustments, allowing for informed decisions.
Explanation:
wajig
: The all-in-one system command.toupgrade
: Command to list packages with available newer versions than those installed.
Example Output:
firefox 91.0.2-1ubuntu1 -> 92.0.1-1ubuntu1
libreoffice-writer 6.4.7.2-2 -> 7.0.0.3-3
...
Use case 8: Display packages which have some form of dependency on a given package
Code:
wajig dependents package
Motivation:
Identifying dependencies is crucial if you’re considering removing a package or understanding the interconnected nature of your installed software. This command effectively tracks down other packages relying on a specific application.
Explanation:
wajig
: Central command for the tool.dependents
: A command argument to trace dependency relationships for a provided package name.package
: Target package name to investigate dependency information.
Example Output:
gnome-control-center
unity-control-center
Conclusion:
Wajig is a powerful tool designed to simplify package management on Debian-based systems through a unified command interface. With its diverse functionalities, ranging from updating software lists to managing disk space, Wajig offers a user-friendly and efficient way to maintain system integrity and performance. Each command in Wajig serves a specific purpose, empowering users with both detailed system insights and hands-on package control.