How to use the command "wajig" (with examples)
- Linux
- November 5, 2023
The command wajig update
is used to update the list of available packages and versions. This command is particularly useful when you want to make sure that you have the latest information about available packages before installing or upgrading any software on your Debian-based system.
By running wajig update
, the system will retrieve the latest package lists from the configured repositories. This ensures that you have access to the most up-to-date software packages.
Example output:
$ wajig update
Updating package lists... Done
Using the wajig command to Install a package or update it to the latest available version
The command wajig install package
is used to install a package or update it to the latest available version. This command is straightforward and a convenient way to manage software installation on Debian-based systems.
When using wajig install
, simply replace ‘package’ with the name of the package you want to install or update. The command will then handle the package installation or update process for you.
Example output:
$ wajig install nginx
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
...
Do you want to continue? [Y/n]
...
Setting up nginx (1.18.0-0ubuntu1) ...
Using the wajig command to Remove a package and its configuration files
If you want to remove a package and also delete its configuration files, you can use the command wajig purge package
. This is useful when you no longer need a particular package and want to ensure that all associated files related to that package are completely removed from your system.
Similar to the previous command, replace ‘package’ with the name of the package you want to remove.
Example output:
$ wajig purge nginx
Reading package lists... Done
...
(Reading database ... 160549 files and directories currently installed.)
...
Removing nginx (1.18.0-0ubuntu1) ...
Purging configuration files for nginx (1.18.0-0ubuntu1) ...
Using the wajig command to Perform an update and then a dist-upgrade
When you want to perform an update followed by a dist-upgrade, you can use the command wajig daily-upgrade
. This command is helpful to ensure that your system is running the latest versions of installed packages and dependencies.
The wajig daily-upgrade
command combines the functionality of wajig update
and wajig dist-upgrade
into a single command. It first updates the package lists and then performs a dist-upgrade to upgrade all installed packages to their latest available versions, resolving any dependency conflicts if necessary.
Example output:
$ wajig daily-upgrade
Updating package lists... Done
...
Calculating upgrade... Done
The following packages will be upgraded:
...
Need to get ... of archives.
...
Do you want to continue? [Y/n]
...
Setting up ...
Using the wajig command to Display the sizes of installed packages
To display the sizes of installed packages on your Debian-based system, you can use the command wajig sizes
. This command provides valuable information about the disk space usage of installed packages.
When running wajig sizes
, the command will retrieve the information about the sizes of all installed packages and display it in a clear, readable format.
Example output:
$ wajig sizes
Package Installed Size Description
acpid 372 kB Advanced Configuration and Power Interface event daemon
adduser 116 kB add and remove users and groups
anacron 286 kB cron-like program that doesn't go by time
apache2 7,060 kB Apache HTTP Server
apparmor 780 kB user-space parser utility for AppArmor
apt 2,218 kB commandline package manager
...
Using the wajig command to List the version and distribution for all installed packages
To obtain a comprehensive list of the version and distribution information for all installed packages on your Debian-based system, you can utilize the wajig versions
command.
By running wajig versions
, the command will fetch the version and distribution details for each package installed on your system. This can be helpful for auditing or verifying the software versions present on your system.
Example output:
$ wajig versions
Package Version Distribution
acpid 1:2.0.12-1ubuntu4 focal
adduser 3.118ubuntu1 focal
anacron 2.3-30ubuntu2 focal
apache2 2.4.41-4ubuntu3.1 focal
apparmor 2.13.3-7ubuntu5.1 focal
apt 2.0.2ubuntu0.2 focal
...
Using the wajig command to List versions of upgradable packages
To check for upgradable packages on your system and obtain information about their available versions, you can utilize the wajig toupgrade
command.
Running wajig toupgrade
will fetch and display a list of packages that have updated versions available. This can be beneficial for ensuring that all software on your system is up to date and for planning any necessary upgrades.
Example output:
$ wajig toupgrade
The following packages have available upgrades:
apache2-utils=2.4.41-4ubuntu3.1
apt=2.0.2ubuntu0.4
apt-utils=2.0.2ubuntu0.4
base-files=11ubuntu5.4
bind9-host=1:9.16.1-0ubuntu2.2
...
Using the wajig command to Display packages which have dependencies on the given package
To find out which packages have any form of dependency on a specified package, you can use the wajig dependents package
command.
By replacing ‘package’ with the name of the package you want to check for dependencies, wajig dependents
will list all the packages that depend on the specified package. This can be useful when you want to understand the impact of removing or modifying a package on your system.
Example output:
$ wajig dependents nginx
The following packages depend on nginx:
package1
package2
package3
...
Conclusion
In this article, we explored various use cases of the wajig
command, which is a simplified all-in-one-place system support tool for Debian-based systems. We have covered commands such as updating the package list, installing or updating packages, removing packages and their configuration files, performing updates and dist-upgrades, displaying package sizes, listing package versions and distributions, displaying upgradable packages, and finding package dependencies. By using these commands, you can efficiently manage packages and dependencies on your Debian-based system.