wajig


Namewajig JSON
Version 4.1.1 PyPI version JSON
download
home_pagehttps://wajig.togaware.com
SummaryDebian/Ubuntu admin management tool
upload_time2023-07-09 06:02:48
maintainer
docs_urlNone
authorGraham Williams
requires_python
license
keywords debian ubuntu admin
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Wajig: Ubuntu System Administration

Wajig is a simplified, all-in-one-place, system support tool for
Debian and Ubuntu.  It aims to cover every common (and some not so
common) tasks you may need to perform in managing your computer. A few
simple examples:

```console
$ wajig install emacs

$ wajig update
$ wajig distupgrade

$ wajig sysinfo
```

Wajig was implemented by Graham Williams. It has been supported by
Dirk Eddelbuettel and Tshepang Lekhonkhobe, with Tshepang maintaining
and improving wajig for a few years. Contributions also come from
users of wajig, with a special thanks to Reuben Thomas for his many
suggestions and contributions. Graham has resumed maintenance and
development.

Installing
----------

Wajig is available in the Debian and Ubuntu repositories. On Ubuntu,
where sudo is set up by default

```consoles
$ sudo apt install wajig
```

It is also available on [PyPI](https://pypi.org/project/wajig/) from
where it can be installed with:

```console
$ pip3 install wajig
```

If sudo is not set up (see instructions below) then as root:

```console
# apt-get install wajig
```

Resources
---------

* [Home](https://wajig.togaware.com) of wajig.
* [Support Wajig](https://togaware.com/gnulinux/) with a donation.
* [GitHub](https://github.com/gjwgit/wajig) for the source code.
* [Ubuntu](https://packages.ubuntu.com/wajig) for the package entry.
* [PyPI](https://pypi.org/project/wajig/) for the public distribution channel.

Guides
------

* [Read The Docs](https://wajig.readthedocs.io/en/latest/) on line.
* [Togaware](https://togaware.com/linux/survivor/wajig.html) for the
  GNU/Linux Survival Guide.
* [LinOxide
  2019](https://linoxide.com/tools/wajig-package-management-debian/) review.
* [Unix Folk
  2017](https://www.unixmen.com/wajig-alternative-apt-package-manager/) review.
* [Source Digit
  2015](https://sourcedigit.com/16708-install-wajig-alternative-to-apt-package-manager-on-linux-ubuntu-15-04/) review.
* [Link Sprite
  2014](https://learn.linksprite.com/pcduino/linux-applications/wajig-simplyfying-ubuntu-debian-administration/) review.

The Name
--------

The word 'jig' has a couple of meanings, as WordNet and Webster's 1913
Dictionary will confirm. It is a small machine or handy tool used to
guide other tools. It is also a quick dance, generally an old rustic
dance involving kicking and leaping, as well as a light, humorous
piece of writing, especially in rhyme, a farce in verse, or a ballad.
"A jig shall be clapped at, and every rhyme praised and applauded."

The 'wa' in 'wajig' is Japanese, indicating 'harmony' and 'team spirit
and unity'.

History
-------

Development of wajig has been sponsored sponsored and supported by
Togaware Pty Ltd, supporting open source software since the 1980's.

Written in Python, wajig uses traditional Debian/Ubuntu administration
and user tools including apt-get, aptitude, dpkg, apt-cache, and very
many others.

Wajig has evolved over more than 20 years and was rewritten from its
original shell script to be a fully fledged Python program. Its goal
is to support general users and administrators alike in using and
maintaining Debian and Ubuntu based systems.  Thus, it captures in a
single command line tool many common tasks for managing a GNU/Linux
system. It is a single and more comprehensive alternative to an
otherwise large suite of separate tools, starting with apt-get and
apt.

Philosophy
----------

In essence, wajig is simply a front-end to many other commands and
below we demonstrate how to manage your system with wajig.  wajig may
not be the answer you are looking for and that is fine. Wherever a
procedure is illustrated with wajig we will often indicate the
underlying commands that are being used to effect the wajig command.
You can then use these underlying commands directly if you
prefer. 

Indeed, wajig itself will show the commands that it runs if you
provide the --teach or --noop options after the wajig command. Both
will show the command being run, with the latter then not actually
running the command:

```console
$ wajig update --noop
/usr/bin/sudo apt update

$ wajig update --teach
/usr/bin/sudo apt update
[sudo] password for kayon: 
Hit:1 https://brave-browser-apt-release.s3.brave.com stable InRelease
[...]
```

Sometimes the underlying commands can be complex and quite long.

Online information about wajig is at https://wajig.togaware.com.
wajig is hosted on github at https://github.com/gjwgit/wajig. Stack
Overflow (https://stackoverflow.com/) is monitored for questions
relating to wajig so please post your queries there.


Motivation
----------

If you've tried to remember all the different commands to get
different information about different aspects of Debian/Ubuntu package
management and then used other commands to install and remove packages
then you'll know that it can become a little too much.

Swapping between dselect, aptitude, apt-get, dpkg, apt-cache, apt, and
so on is interesting but cumbersome.  Also, dselect and aptitude can
be confusing and even though you can spend hours understanding each of
them, it may not be time particularly well spent.

This Python script simply collects together shortcuts to various
commands!  Clearly no everything is covered, but as new capabilities
are understood they get added to the toolkit.


Basics
------

Wajig is designed to run in such a way as to suit the system it is
running on and the policies of the system administrators.  It can be
run as a normal user, but once a privileged command is required it
will use either su and ask for the root user's password, or else it
can use sudo and rely on the normal user's password. It can also be
run directly as root without any extra setup (i.e., without the need
for sudo or regularly supplying passwords). Using sudo requires a
little setting (see below).

Try the help command for a list of common commands provided by
wajig:
```console
$ wajig help
```

Examples commands include:
```console
$ wajig update               (= apt-get update)
$ wajig install less         (= apt-get install less)
$ wajig new                  (list new packages since last update)
$ wajig newupgrades          (list packages upgraded since last update)
$ wajig updatealts editor    (update the default "editor")
$ wajig restart apache       (restart the apache daemon)
$ wajig listfiles less       (list the files supplied by the "less" pkg)
$ wajig whichpkg stdio.h     (what package supplies this header file)
$ wajig whatis rats          (one line description of the package "rats")
$ wajig orphans              (list libraries not required by other pkgs)
```

For a complete list of available commands:
```console
$ wajig list-commands
```

In most cases, wajig expects a command and will call upon other Debian
tools to perform the command.


Getting Started With Sudo
-------------------------

The aim of wajig is to operate as much as possible as a user command
and to do super user privileged commands only when necessary (if that
is how the system administrator wishes to allow a user to maintain
their system).  The easiest way to do this is to use the sudo package
which will ask you for your password and then run the command as the
super user. If you don't have sudo installed then wajig will use su to
run as super user, but you will need to enter the super user password
frequently. If sudo is installed but not set up for you to access the
appropriate apt-get commands you will see a permission denied message.

In order to allow your user to use sudo, run this command as root:

```console
# adduser <username> sudo
```

The change will take effect after logging out and in again.


Hacking
-------

* Setup::
```console
$ wajig install devscripts debhelper
$ debcheckout wajig
$ cd wajig
```
* Build::
```console
$ debuild -us -uc
```
* Install::
```console
$ sudo debi
```

* Ensure that user-visible changes are mentioned in
  ``debian/changelog``; use ``/usr/bin/debchange`` from within the
  project root directory and do your changes there.

HowTo Release
-------------

* Ensure that the version string in ``src/wajig.py`` as updated from
  the Makefil matches that of latest changelog.

* Ensure that debuild does not emit any lintian errors/warnings.

Available Packages
------------------

The Debian packaging system relies on your local system having some
idea of what packages are available. This is initialised when you
install your system.  You will generally need to update this list of
packages with what is currently available from the Debian archives for
downloading.  If you are staying with the stable release you generally
only need to update the list of available packages once.  The
following command is used to update the information about what is
available for downloading:

```console
$ wajig update                (apt update)
```

(In brackets after the wajig command is the underlying command that
wajig calls upon to perform the operation.)

This uses entries in the file /etc/apt/sources.list to know where to
get the list of available packages from and which release of Debian
you wish to follow.  You can edit this file with:

  $ wajig editsources           (<configured editor> /etc/apt/sources.list)

It will check if $VISUAL and $EDITOR are defined, and use the editors
defined there. If not, it will simply use /usr/bin/sensible-editor.

You need to understand the format of the file /etc/apt/sources.list as
explained in the manual page:

  $ man sources.list

It is pretty straightforward and we will see examples in the next
section.

If you have a Debian CD-ROM or DVD-ROM then you can tell apt what is
available on it using:

  $ wajig addcdrom

To add a Launchpad PPA (Personal Package Archive) repository (used by
Ubuntu) the ADD-REPO command can be used. For example, to add the
daily builds of Google's Chromium browser, do the following:

  $ wajig addrepo ppa:chromium-daily

If you want to check when you last did an update then:

  $ wajig lastupdate

There are quite a few archives available and you can test for a good
connection to one with:

  $ wajig searchapt

This will write a candidate sources.list in the current directory,
which you can then review and add to the system sources.list, if you
wish, with

  $ wajig editsources


FINDING PACKAGES

To search for a particular packages, use:

  $ wajig search                        (apt-cache --names-only)

This will only match a particular string with package names. If you want
a more comprehensive search, one that also searches for package
descriptions, use the "-v|--verbose" options.

To display the list of newly-available packages (after a cache update), use:

  $ wajig new

Note that after the first time you use update all packages will be
considered new! But after the next update the new packages are those
that were not in the available list from the previous update.

Some (and often many) of the packages that you already have installed
on your Debian system may have been upgraded in the archive since the
last time you performed an update. The following command will list
these packages:

  $ wajig newupgrades

For a complete list of the packages you have installed but for which
there are newer versions available on the archive use:

  $ wajig toupgrade

To check the version of any installed package and also the version
available from the archive previously (i.e., the last time, but one,
you performed an upgrade) and now (based on the last time you
performed an update), and to also see the so called Desired and Status
flags of the package, use:

  $ wajig status <package names>        (similar to dpkg -l)

Without a list of package names all installed packages will be listed.

A variation is to list the status of all packages with a given string
in their name:

  $ wajig statussearch <string>

To check for a particular package for which you might guess at part of
its name you can use:

  $ wajig listnames <string>            (apt-cache pkgnames)

Without the string argument all known package names will be listed.

To list the names and current install status of all installed packages
then use:

  $ wajig list

You can also list just the names of the packages installed with:

  $ wajig list-installed

And if you are looking for a particular installed package with a name
containing a particular string then use:

  $ wajig list-installed <string>

To generate a list of packages, with version numbers, which you might
save to file, and then restore a system to just this list of packages
at a later stage, use:

  $ wajig snapshot > snapshop-12dec04

Each package installs some collection of files in different places on
your system (e.g., in /usr/bin/, /usr/man/man1/ and
usr/doc/). Sometimes you like to see where those files go or
even just view the list of files installed. The command to use is:

  $ wajig listfiles <package name>      (dpkg --listfiles )


To list a one-line description for a package use:

  $ wajig whatis <package name>

And to find which package supplies a given file use:

  $ wajig whichpkg <command or file path>

and for a command (e.g., most):

  $ wajig whichpkg $(which -p most)


For unofficial packages (i.e., you came across a package but it doesn't
seem to be in Debian yet) search for a site with:

  $ wajig searchpkg <package-name>


The more detailed description of a package is available with:

  $ wajig detail <package-name>

Here, the package name can be replaced with a specific deb file.

The Debian changelog can be retrieved with:

  $ wajig changelog <package name>

This command only displays changelog entries for upgradable packages.
If you want to display the entire changelog, use:

  $ wajig changelog --verbose <package name>

It may be more practical to run the output through a pager:

  $ wajig changelog --verbose <package name> | pager



INSTALLING PACKAGES

To install a new package (or even to update an already installed
package) all you need do is:

  $ wajig install <package name>        (apt-get install)

(Instead of install you could equivalently say update.)

You can list multiple packages to install with the one command.

The install command will also accept a .deb file.  So, for example, if
you have downloaded a Debian package file (with the .deb extension)
you can install it with:

  $ wajig install <.deb file>           (dpkg -i)

The .deb file will be searched for in both the current directory and
in the apt archive at /var/cache/apt/archive/.

You can list multiple .deb files to install.

If the .deb package file you wish to install is available on the
internet you can give its address and wajig will download then install
it:

  $ wajig install http://samfundet.no/debian/dists/woody/css/xine-dvd-css.deb

Sometimes you may want to install many packages by listing them in a
file, one per line.  You can do this with:

  $ wajig install --fileinput <filename>

The file of packages to install can conveniently be created from the
list of installed packages on another system with:

  $ wajig listinstalled > <filename>    (dpkg --get-selections)


UPGRADING PACKAGES

You can upgrade all installed packages with:

  $ wajig upgrade                       (apt-get -u upgrade)

And you can upgrade all installed packages, remove those packages that
need to be removed (for various reasons, including issues to do with
dependencies) and install all newly required packages in the
distribution with:

  $ wajig distupgrade                  (apt-get -u dist-upgrade)

Note that a dist-upgrade will potentially remove packages where
dependency checking indicates this is necessary. Important packages
(determined by the Priority specification which can be found using the
details command) will be upgraded even at the cost of downgrading
other (less important) packages.

If this is an issue for you then you should use the upgrade command
rather than dist-upgrade. This command will never remove or downgrade
a package.

To upgrade to a specific distribution (e.g., experimental) you can use:

  # wajig distupgrade --dist experimental

Note that the mentioned distribution must also be mentioned in your
/etc/apt/sources.list file.


A neat trick with wajig is the ability to upgrade a collection of
packages all with the same version number to another common version
number:

  $ wajig status | grep 3.2.3-2 | grep 3.3.0-1 | cut -f1 > list
  $ wajig installfile list


REMOVING PACKAGES

Once a package is installed you can remove it with:

  $ wajig remove <package name>         (apt-get remove)

Once again, you can list multiple packages to remove with the one
command.

A remove will not remove configuration files (in case you have done
some configuration of the package and later re-install the package).
To get rid of the configuation files as well use:

  $ wajig purge <package name>          (apt-get --purge remove)


DISPLAYING APT LOG

Whenever a package is installed, removed, upgraded, or downgraded
with either apt, aptitude, or synaptic, a log found at
/var/log/apt/history.log is updated. To display it, run:

  $ wajig list-log                      (cat /var/log/apt/history.log)



CHECKING WHAT'S CHANGED BEFORE INSTALLING

When you install an updated package it is sometimes useful to know
what's changed.  The apt-listchanges package provides a mechanism
whereby when updating packages you will be given a chance to review
the changelog of the package and then decide whether to continue with
the upgrade. Simply install the apt-listchanges package to turn this
feature on.


INSTALLING ALIEN (RedHat/Fedora/CentOS) PACKAGES

RedHat has quite an installed base of users. Some packages
(particularly commercial packages) are available as RedHat packages
(with the rpm extension). These can usually be installed in Debian
with little effort.  The alien package is required to convert the rpm
into deb format which can then be installed. This is taken care of by
wajig:

  $ wajig rpminstall gmyclient-0.0.91b-1.i386.rpm


PUTTING PACKAGES ON HOLD

Occasionally, and particularly if you are following the unstable
release, some packages are broken for various reasons.  This was the
case with the package cdrecord in unstable.  This package was compiled
with kernel 2.4.n and had some kernel specific issues that were done
differently with kernel 2.2.n. At compile time one or the other
options was chosen (but not both!). Thus the newer binary versions of
cdrecord would not run on a system using kernel 2.2.n. One solution is
to build a Debian package of cdrecord using the wajig build command.
Another is to reinstall an older version that worked and then place
the package on hold with:

  $ wajig hold cdrecord

A wajig upgrade would not try to upgrade this package.


BUILDING PACKAGES

Sometimes the binary distribution of the package is configured or
compiled with options that don't suit you. Or it may be compiled for a
more recent release than that which you are using and does not work
for your release. Normally you would then be left on your own to
retrieve the source of the package, configure and compile it, then
install it into /usr/local/.  This is then outside of the Debian
package management system, which is just fine.  But there are better
solutions. One is to tune a specific source package and build a Debian
package from it. The second is to specify general configuration
options for your system and then rebuild many packages with these
options.


BUILDING PACKAGES FROM SOURCE

You can download the source code for any Debian package from the
Debian archive. You can then modify it and generate your own .deb file
for installation. To download the source of a Debian package you will
need deb-src lines in your /etc/apt/sources.list file, such as the
following:

  deb-src http://ftp.debian.org/debian unstable main contrib non-free

Generally you can add the '-src' to copies of pre-existing 'deb'
lines.

To retrieve and unpack a source Debian package use:

  $ wajig source <package names>                (apt-get source)

Note that you can list several packages and grab all of their sources.

The source command downloads a .tar.gz file and a .dsc file for the
package. The .tar.gz file contains the source code and associated
files. The .dsc file contains test information that is used by the
packaging system. The source command will also extract the contents of
the .tar.gz archive into a subdirectory consisting of the package name
and version.

To go one step further and also configure, compile and generate a
default Debian .deb package from source code (useful if you need to
compile a package for your setup specifically) then use instead:

  $ wajig build <package names>

This conveniently installs the needed build-dependencies for you.

If you need to modify the source in some way and rebuild a package:

 $ wajig update
 $ wajig build ncftp
 $ dpkg-source -x ncftp_3.0.2-3.dsc
 $ cd ncftp-3.0.2
 $ fakeroot dpkg-buildpackage -b -u

Note that for some packages, you will get permission-related build errors.
Replace 'fakeroot' with 'sudo' in such cases.


BUILD ARCHITECTURE-OPTIMISED PACKAGES

The apt-build package, a front-end to apt-get, provides a general
solution to build Debian packages tuned (or optimised) for your
architecture.

  $ wajig install apt-build

You will be asked for some options, and these go into
/etc/apt/apt-build.conf:

  build-dir = /var/cache/apt-build/build
  repository-dir = /var/cache/apt-build/repository
  Olevel = -O2
  march = -march=pentium4
  mcpu = -mcpu=pentium4
  options = " "

The built packages will be placed into
/var/cache/apt-build/repository, an can be accessed with the
standard Debian package tools by adding the following line to the top
of /etc/apt/sources.list (which can be done during the
installation of apt-build:

  deb file:/var/cache/apt-build/repository apt-build main

You will need deb-src entries in your /etc/apt/sources.list file to be
able to obtain the source packages.

Being a front-end to apt-get, your first apt-build command might be to
update the list of known available packages (particularly if you have
just added a deb-src entry to /etc/apt/sources.list), although the
following is equivalent:

  $ wajig update

You can then start building packages:

  $ sudo apt-build install most

You can manage a collection of packages to be recompiled and installed
instead of obtaining the default compiled versions. Create the file
/etc/apt/apt-build.list to contain a list of such packages
and then:

  $ sudo apt-build world

One way to get a full list of installed packages is:

  # dpkg --get-selections | awk '{if ($2 == "install") print $1' \\
    > /etc/apt/apt-build.list

Be sure to edit the list to remove, for example, gcc! Then a:

  $ sudo apt-build world

will recompile and optimise all packages.


PINNING DISTRIBUTIONS

With the Debian packaging system you can specify that your packages
come by default from one distribution but you can override this with
packages from other distributions. The concept is called pinning and
after it is set up you can have, for example, testing as
your default release and then include unstable in
/etc/apt/sources.list and install cdrecord from unstable with:

  # apt-get install cdrecord/unstable

The following /etc/apt/preferences makes apt-get use testing unless it
is overridden, even though there are entries for unstable in
/etc/apt/sources.list:

  Package: *
  Pin: release a=testing
  Pin-Priority: 900

  Package: *
  Pin: release o=Debian
  Pin-Priority: -10


RECONFIGURE PACKAGES

  $ wajig reconfigure debconf           (dpkg-reconfigure  debconf)

An alternative where you can specify a particular front end to use for
the configurator is:

  # dpkg-reconfigure --frontend=dialog debconf


SETTING DEFAULT APPLICATIONS

Debian has a system of alternatives for various commands (or
functionalities).  For example, the editor command could be nano or
nvi, or one of a large number of alternative editors.  You can update
the default for this command with:

  $ wajig updatealts editor             (update-alternatives --config editor)

Another common alternative is x-window-manager. You can get a list of
all alternatives with:

  $ wajig listalts                      (ls /etc/alternatives/)

The information is maintained in the directory /etc/alternatives/.

BUGS

If you find a problem with your system and think it might be a bug, use:

  $ wajig bug                           (reportbug)

This will allow you to view bugs recorded against packages and also
allow you to add a new bug report to the Debian bug reporting system.

Otherwise visit the Debian email lists at http://lists.debian.org/ and
search for the problem there.  The advice one gets here is generally
of high quality.


MANAGING DAEMONS OR SERVICES

In addition to managing the installed packages wajig also allows you
to start, stop, reload, and restart services (which are often provided
by so called daemons---processes that run on your computer in the
background performing various functions on an on-going basis).  The
commands all follow the same pattern:

  $ wajig restart <service name>        (/etc/init.d/<service> restart)

The start and stop commands are obvious.  The restart command
generally performs a stop followed by a start.  The reload command
will ask the daemon to reload its configuration files generally
without stopping the daemon, if this is possible.  The services you
can specifiy here depend on what you have installed.  Common services
include:

  apache Web server
  cron   Regular task scheduler
  exim   Email delivery system
  gdm    The Gnome Windows Display Manager (for logging on)
  ssh    The Secure Shell daemon

Generally, daemons are started at system boot time automatically.


ALTERNATIVE APPLICATIONS

Debian has a mechanism for dealing with applications that provide the
same functionality.  We describe here how this mechanism works and how
you can use it to tune your installation.

If you have more than one variant of emacs installed (e.g., emacs19,
emacs20, and xemacs) then you can configure which one you get by
default with:

  $ wajig updatealts emacs

You will be asked to choose from a list of alternatives.

To specify which window manager to use as the system default:

  $ wajig updatealts x-window-manager

Suppose the window-manager you want to use as the default is not
listed as available. You can install it with:

# update-alternatives --install /usr/bin/x-window-manager \\
                      x-window-manager /usr/bin/mywm PRIORITY

Where PRIORITY is a number higher than the highest existing priority
for the x-window-manager alternative.  You can get a list of
priorities with:

# update-alternatives --display x-window-manager

To remove a Window Manager:

# update-alternatives --remove x-window-manager /usr/bin/mywm


PACKAGE ARCHIVES

Local Cache

When packages are installed from the Debian Archives the corresponding
deb files are stored in /var/cache/apt/archive.  This can become quite
populated with older versions of packages and we can clean out these
older versions with:

  $ wajig autoclean                     (apt-get autoclean)

Warning: It is sometimes useful to have older versions of packages
hanging around if you are tracking the unstable release.  Sometimes
the newer versions of packages are broken and you need to revert to an
older version which may not be available from the Debian archives, but
might be in your local download archive.

If you get short of disk space then you might want to remove all the
downloaded deb files (not just the older versions of downloaded files)
with:

  $ wajig clean                         (apt-get clean)

To remove files immediately after they have been installed edit
/etc/apt/apt.conf:

  // Things that effect the APT dselect method
  DSelect
  {
    Clean "auto";   // always|auto|prompt|never
  ;

Historic Packages

To obtain any package version that might have appeared in the archive
include http://snapshot.debian.net in your package sources list and
the name of the package you are interested in. To update your sources
list run:

  $ wajig editsources

to add the following line:

  deb http://snapshot.debian.net/archive pool sed

Then you can do, for example:

  $ wajig available sed
  $ wajig install sed=4.1.2-1


MAINTAINING A DISTRIBUTION ARCHIVE

Downloaded Debian packages are placed into /var/cache/apt/archive. You
can have the files moved into a local hierarchy that mirrors a
standard Debian distribution hierarchy.  Then you can point the
/etc/apt/sources.list to this local archive by using the file://
format.

To set up a local machine as a local (partial) mirror of the Debian
archive, wajig will use the apt-move package.

Edit /etc/apt-move.conf to set the DIST to match your system (default
is stable):

  DIST=unstable

The wajig command move will then move any packages in your
/var/cache/apt/archives into the Debian mirror being created:

  $ wajig move

You can actually create a complete mirror with:

  # apt-move mirror

These commands place the packages into /mirrors/debian. To make it
available on your web server simply:

  # cd /var/www
  # ln -s /mirrors pub

The file /etc/apt/sources.list can then be updated to point to the new
archive as the first place to check for packages (place this lines
first in the file):

  deb http://athens/pub/debian unstable main contrib non-free


All of this might happen on your server (called athens in this
example) and other machines on your local network can then access the
local archive by adding the above line to /etc/apt/sources.list.

If your server is not the most up to date machine (since you may not
want to run the risk of your server becoming unstable), you can rsync
all packages in /var/cache/apt/archives on other machines to the
server and then run the move command on the server:

  # rsync -vr friend:/var/cache/apt/archives/ /var/cache/apt/archives/
  # ssh friend wajig clean         (apt-get clean)
  # wajig move                     (apt-move update)

In fact, on your server you could use the following Python script
saved to file /root/apt-archive.py to automate this for each of the
hosts on the network:

    #!/usr/bin/env python
    import os

    hosts = ['friend', 'cargo']
    archive = '/var/cache/apt/archives/'

    for h in hosts:
        os.system('rsync -vr %s:%s %s' % (h, archive, archive))
        os.system('ssh %s wajig clean' % h)

    os.system('wajig move')

Then set the script up to run:

  # chmod u+x apt-archive.py

and run it as required:

  # ./apt-archive.py

Depending on how you have ssh set up this may ask for your password
for each connection.  To avoid this, you can use public/private keys
with no passphrase, and then the script could be run automatically
using cron each morning by copying the executable script to
/etc/cron.daily/apt-archive. (Scripts in /etc/cron.daily with a py
extension are not run, so be sure to rename the file as suggested
here.)

Local Debian Package Cache

To set up a local Debian cache of deb files that you've created or
downloaded separately:

  # mkdir -p /usr/local/cache/dists/local/local/binary-i386
  # cp *.deb /usr/local/cache/dists/local/local/binary-i386
  # cd /usr/local/cache
  # dpkg-scanpackages dists/local/local/binary-i386 /dev/null \\
  $ dists/local/local/binary-i386/Packages

Then add the following line to /etc/apt/sources.list:

  deb file:/usr/local/cache local local


OTHER COMMANDS

These may work their way into wajig.

You can use the apt-get --download-only option of apt-get to download
the files for an install without actually unpacking and setting up the
packages. For example:

  # wajig update
  # apt-get --download-only dist-upgrade

In this way you are able to leave the download unattended and when you
are ready you can monitor the unpacking and setup.

If things go wrong somewhere then apt may be able to help:

  # apt-get --fix-broken dist-upgrade

but if things still don't work, you may need to use dpkg directly to
remove and isntall packages.

Synchronising Two Installations

The package system maintains a list of all packages installed (and
de-installed). You can access this list, save it to a file, and use it
to mark those same packages for installation (or deinstallation) on
anther machine:

# dpkg --get-selections > dpkg-selections
# dpkg --set-selections < dpkg-selections
# apt-get dselect-upgrade

            

Raw data

            {
    "_id": null,
    "home_page": "https://wajig.togaware.com",
    "name": "wajig",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "debian ubuntu admin",
    "author": "Graham Williams",
    "author_email": "wajig@togaware.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/02/7c1c2f87c20cb0e2d5857201096735e31e37d618a2e31115bbf8880f6eb4/wajig-4.1.1.tar.gz",
    "platform": null,
    "description": "# Wajig: Ubuntu System Administration\n\nWajig is a simplified, all-in-one-place, system support tool for\nDebian and Ubuntu.  It aims to cover every common (and some not so\ncommon) tasks you may need to perform in managing your computer. A few\nsimple examples:\n\n```console\n$ wajig install emacs\n\n$ wajig update\n$ wajig distupgrade\n\n$ wajig sysinfo\n```\n\nWajig was implemented by Graham Williams. It has been supported by\nDirk Eddelbuettel and Tshepang Lekhonkhobe, with Tshepang maintaining\nand improving wajig for a few years. Contributions also come from\nusers of wajig, with a special thanks to Reuben Thomas for his many\nsuggestions and contributions. Graham has resumed maintenance and\ndevelopment.\n\nInstalling\n----------\n\nWajig is available in the Debian and Ubuntu repositories. On Ubuntu,\nwhere sudo is set up by default\n\n```consoles\n$ sudo apt install wajig\n```\n\nIt is also available on [PyPI](https://pypi.org/project/wajig/) from\nwhere it can be installed with:\n\n```console\n$ pip3 install wajig\n```\n\nIf sudo is not set up (see instructions below) then as root:\n\n```console\n# apt-get install wajig\n```\n\nResources\n---------\n\n* [Home](https://wajig.togaware.com) of wajig.\n* [Support Wajig](https://togaware.com/gnulinux/) with a donation.\n* [GitHub](https://github.com/gjwgit/wajig) for the source code.\n* [Ubuntu](https://packages.ubuntu.com/wajig) for the package entry.\n* [PyPI](https://pypi.org/project/wajig/) for the public distribution channel.\n\nGuides\n------\n\n* [Read The Docs](https://wajig.readthedocs.io/en/latest/) on line.\n* [Togaware](https://togaware.com/linux/survivor/wajig.html) for the\n  GNU/Linux Survival Guide.\n* [LinOxide\n  2019](https://linoxide.com/tools/wajig-package-management-debian/) review.\n* [Unix Folk\n  2017](https://www.unixmen.com/wajig-alternative-apt-package-manager/) review.\n* [Source Digit\n  2015](https://sourcedigit.com/16708-install-wajig-alternative-to-apt-package-manager-on-linux-ubuntu-15-04/) review.\n* [Link Sprite\n  2014](https://learn.linksprite.com/pcduino/linux-applications/wajig-simplyfying-ubuntu-debian-administration/) review.\n\nThe Name\n--------\n\nThe word 'jig' has a couple of meanings, as WordNet and Webster's 1913\nDictionary will confirm. It is a small machine or handy tool used to\nguide other tools. It is also a quick dance, generally an old rustic\ndance involving kicking and leaping, as well as a light, humorous\npiece of writing, especially in rhyme, a farce in verse, or a ballad.\n\"A jig shall be clapped at, and every rhyme praised and applauded.\"\n\nThe 'wa' in 'wajig' is Japanese, indicating 'harmony' and 'team spirit\nand unity'.\n\nHistory\n-------\n\nDevelopment of wajig has been sponsored sponsored and supported by\nTogaware Pty Ltd, supporting open source software since the 1980's.\n\nWritten in Python, wajig uses traditional Debian/Ubuntu administration\nand user tools including apt-get, aptitude, dpkg, apt-cache, and very\nmany others.\n\nWajig has evolved over more than 20 years and was rewritten from its\noriginal shell script to be a fully fledged Python program. Its goal\nis to support general users and administrators alike in using and\nmaintaining Debian and Ubuntu based systems.  Thus, it captures in a\nsingle command line tool many common tasks for managing a GNU/Linux\nsystem. It is a single and more comprehensive alternative to an\notherwise large suite of separate tools, starting with apt-get and\napt.\n\nPhilosophy\n----------\n\nIn essence, wajig is simply a front-end to many other commands and\nbelow we demonstrate how to manage your system with wajig.  wajig may\nnot be the answer you are looking for and that is fine. Wherever a\nprocedure is illustrated with wajig we will often indicate the\nunderlying commands that are being used to effect the wajig command.\nYou can then use these underlying commands directly if you\nprefer. \n\nIndeed, wajig itself will show the commands that it runs if you\nprovide the --teach or --noop options after the wajig command. Both\nwill show the command being run, with the latter then not actually\nrunning the command:\n\n```console\n$ wajig update --noop\n/usr/bin/sudo apt update\n\n$ wajig update --teach\n/usr/bin/sudo apt update\n[sudo] password for kayon: \nHit:1 https://brave-browser-apt-release.s3.brave.com stable InRelease\n[...]\n```\n\nSometimes the underlying commands can be complex and quite long.\n\nOnline information about wajig is at https://wajig.togaware.com.\nwajig is hosted on github at https://github.com/gjwgit/wajig. Stack\nOverflow (https://stackoverflow.com/) is monitored for questions\nrelating to wajig so please post your queries there.\n\n\nMotivation\n----------\n\nIf you've tried to remember all the different commands to get\ndifferent information about different aspects of Debian/Ubuntu package\nmanagement and then used other commands to install and remove packages\nthen you'll know that it can become a little too much.\n\nSwapping between dselect, aptitude, apt-get, dpkg, apt-cache, apt, and\nso on is interesting but cumbersome.  Also, dselect and aptitude can\nbe confusing and even though you can spend hours understanding each of\nthem, it may not be time particularly well spent.\n\nThis Python script simply collects together shortcuts to various\ncommands!  Clearly no everything is covered, but as new capabilities\nare understood they get added to the toolkit.\n\n\nBasics\n------\n\nWajig is designed to run in such a way as to suit the system it is\nrunning on and the policies of the system administrators.  It can be\nrun as a normal user, but once a privileged command is required it\nwill use either su and ask for the root user's password, or else it\ncan use sudo and rely on the normal user's password. It can also be\nrun directly as root without any extra setup (i.e., without the need\nfor sudo or regularly supplying passwords). Using sudo requires a\nlittle setting (see below).\n\nTry the help command for a list of common commands provided by\nwajig:\n```console\n$ wajig help\n```\n\nExamples commands include:\n```console\n$ wajig update               (= apt-get update)\n$ wajig install less         (= apt-get install less)\n$ wajig new                  (list new packages since last update)\n$ wajig newupgrades          (list packages upgraded since last update)\n$ wajig updatealts editor    (update the default \"editor\")\n$ wajig restart apache       (restart the apache daemon)\n$ wajig listfiles less       (list the files supplied by the \"less\" pkg)\n$ wajig whichpkg stdio.h     (what package supplies this header file)\n$ wajig whatis rats          (one line description of the package \"rats\")\n$ wajig orphans              (list libraries not required by other pkgs)\n```\n\nFor a complete list of available commands:\n```console\n$ wajig list-commands\n```\n\nIn most cases, wajig expects a command and will call upon other Debian\ntools to perform the command.\n\n\nGetting Started With Sudo\n-------------------------\n\nThe aim of wajig is to operate as much as possible as a user command\nand to do super user privileged commands only when necessary (if that\nis how the system administrator wishes to allow a user to maintain\ntheir system).  The easiest way to do this is to use the sudo package\nwhich will ask you for your password and then run the command as the\nsuper user. If you don't have sudo installed then wajig will use su to\nrun as super user, but you will need to enter the super user password\nfrequently. If sudo is installed but not set up for you to access the\nappropriate apt-get commands you will see a permission denied message.\n\nIn order to allow your user to use sudo, run this command as root:\n\n```console\n# adduser <username> sudo\n```\n\nThe change will take effect after logging out and in again.\n\n\nHacking\n-------\n\n* Setup::\n```console\n$ wajig install devscripts debhelper\n$ debcheckout wajig\n$ cd wajig\n```\n* Build::\n```console\n$ debuild -us -uc\n```\n* Install::\n```console\n$ sudo debi\n```\n\n* Ensure that user-visible changes are mentioned in\n  ``debian/changelog``; use ``/usr/bin/debchange`` from within the\n  project root directory and do your changes there.\n\nHowTo Release\n-------------\n\n* Ensure that the version string in ``src/wajig.py`` as updated from\n  the Makefil matches that of latest changelog.\n\n* Ensure that debuild does not emit any lintian errors/warnings.\n\nAvailable Packages\n------------------\n\nThe Debian packaging system relies on your local system having some\nidea of what packages are available. This is initialised when you\ninstall your system.  You will generally need to update this list of\npackages with what is currently available from the Debian archives for\ndownloading.  If you are staying with the stable release you generally\nonly need to update the list of available packages once.  The\nfollowing command is used to update the information about what is\navailable for downloading:\n\n```console\n$ wajig update                (apt update)\n```\n\n(In brackets after the wajig command is the underlying command that\nwajig calls upon to perform the operation.)\n\nThis uses entries in the file /etc/apt/sources.list to know where to\nget the list of available packages from and which release of Debian\nyou wish to follow.  You can edit this file with:\n\n  $ wajig editsources           (<configured editor> /etc/apt/sources.list)\n\nIt will check if $VISUAL and $EDITOR are defined, and use the editors\ndefined there. If not, it will simply use /usr/bin/sensible-editor.\n\nYou need to understand the format of the file /etc/apt/sources.list as\nexplained in the manual page:\n\n  $ man sources.list\n\nIt is pretty straightforward and we will see examples in the next\nsection.\n\nIf you have a Debian CD-ROM or DVD-ROM then you can tell apt what is\navailable on it using:\n\n  $ wajig addcdrom\n\nTo add a Launchpad PPA (Personal Package Archive) repository (used by\nUbuntu) the ADD-REPO command can be used. For example, to add the\ndaily builds of Google's Chromium browser, do the following:\n\n  $ wajig addrepo ppa:chromium-daily\n\nIf you want to check when you last did an update then:\n\n  $ wajig lastupdate\n\nThere are quite a few archives available and you can test for a good\nconnection to one with:\n\n  $ wajig searchapt\n\nThis will write a candidate sources.list in the current directory,\nwhich you can then review and add to the system sources.list, if you\nwish, with\n\n  $ wajig editsources\n\n\nFINDING PACKAGES\n\nTo search for a particular packages, use:\n\n  $ wajig search                        (apt-cache --names-only)\n\nThis will only match a particular string with package names. If you want\na more comprehensive search, one that also searches for package\ndescriptions, use the \"-v|--verbose\" options.\n\nTo display the list of newly-available packages (after a cache update), use:\n\n  $ wajig new\n\nNote that after the first time you use update all packages will be\nconsidered new! But after the next update the new packages are those\nthat were not in the available list from the previous update.\n\nSome (and often many) of the packages that you already have installed\non your Debian system may have been upgraded in the archive since the\nlast time you performed an update. The following command will list\nthese packages:\n\n  $ wajig newupgrades\n\nFor a complete list of the packages you have installed but for which\nthere are newer versions available on the archive use:\n\n  $ wajig toupgrade\n\nTo check the version of any installed package and also the version\navailable from the archive previously (i.e., the last time, but one,\nyou performed an upgrade) and now (based on the last time you\nperformed an update), and to also see the so called Desired and Status\nflags of the package, use:\n\n  $ wajig status <package names>        (similar to dpkg -l)\n\nWithout a list of package names all installed packages will be listed.\n\nA variation is to list the status of all packages with a given string\nin their name:\n\n  $ wajig statussearch <string>\n\nTo check for a particular package for which you might guess at part of\nits name you can use:\n\n  $ wajig listnames <string>            (apt-cache pkgnames)\n\nWithout the string argument all known package names will be listed.\n\nTo list the names and current install status of all installed packages\nthen use:\n\n  $ wajig list\n\nYou can also list just the names of the packages installed with:\n\n  $ wajig list-installed\n\nAnd if you are looking for a particular installed package with a name\ncontaining a particular string then use:\n\n  $ wajig list-installed <string>\n\nTo generate a list of packages, with version numbers, which you might\nsave to file, and then restore a system to just this list of packages\nat a later stage, use:\n\n  $ wajig snapshot > snapshop-12dec04\n\nEach package installs some collection of files in different places on\nyour system (e.g., in /usr/bin/, /usr/man/man1/ and\nusr/doc/). Sometimes you like to see where those files go or\neven just view the list of files installed. The command to use is:\n\n  $ wajig listfiles <package name>      (dpkg --listfiles )\n\n\nTo list a one-line description for a package use:\n\n  $ wajig whatis <package name>\n\nAnd to find which package supplies a given file use:\n\n  $ wajig whichpkg <command or file path>\n\nand for a command (e.g., most):\n\n  $ wajig whichpkg $(which -p most)\n\n\nFor unofficial packages (i.e., you came across a package but it doesn't\nseem to be in Debian yet) search for a site with:\n\n  $ wajig searchpkg <package-name>\n\n\nThe more detailed description of a package is available with:\n\n  $ wajig detail <package-name>\n\nHere, the package name can be replaced with a specific deb file.\n\nThe Debian changelog can be retrieved with:\n\n  $ wajig changelog <package name>\n\nThis command only displays changelog entries for upgradable packages.\nIf you want to display the entire changelog, use:\n\n  $ wajig changelog --verbose <package name>\n\nIt may be more practical to run the output through a pager:\n\n  $ wajig changelog --verbose <package name> | pager\n\n\n\nINSTALLING PACKAGES\n\nTo install a new package (or even to update an already installed\npackage) all you need do is:\n\n  $ wajig install <package name>        (apt-get install)\n\n(Instead of install you could equivalently say update.)\n\nYou can list multiple packages to install with the one command.\n\nThe install command will also accept a .deb file.  So, for example, if\nyou have downloaded a Debian package file (with the .deb extension)\nyou can install it with:\n\n  $ wajig install <.deb file>           (dpkg -i)\n\nThe .deb file will be searched for in both the current directory and\nin the apt archive at /var/cache/apt/archive/.\n\nYou can list multiple .deb files to install.\n\nIf the .deb package file you wish to install is available on the\ninternet you can give its address and wajig will download then install\nit:\n\n  $ wajig install http://samfundet.no/debian/dists/woody/css/xine-dvd-css.deb\n\nSometimes you may want to install many packages by listing them in a\nfile, one per line.  You can do this with:\n\n  $ wajig install --fileinput <filename>\n\nThe file of packages to install can conveniently be created from the\nlist of installed packages on another system with:\n\n  $ wajig listinstalled > <filename>    (dpkg --get-selections)\n\n\nUPGRADING PACKAGES\n\nYou can upgrade all installed packages with:\n\n  $ wajig upgrade                       (apt-get -u upgrade)\n\nAnd you can upgrade all installed packages, remove those packages that\nneed to be removed (for various reasons, including issues to do with\ndependencies) and install all newly required packages in the\ndistribution with:\n\n  $ wajig distupgrade                  (apt-get -u dist-upgrade)\n\nNote that a dist-upgrade will potentially remove packages where\ndependency checking indicates this is necessary. Important packages\n(determined by the Priority specification which can be found using the\ndetails command) will be upgraded even at the cost of downgrading\nother (less important) packages.\n\nIf this is an issue for you then you should use the upgrade command\nrather than dist-upgrade. This command will never remove or downgrade\na package.\n\nTo upgrade to a specific distribution (e.g., experimental) you can use:\n\n  # wajig distupgrade --dist experimental\n\nNote that the mentioned distribution must also be mentioned in your\n/etc/apt/sources.list file.\n\n\nA neat trick with wajig is the ability to upgrade a collection of\npackages all with the same version number to another common version\nnumber:\n\n  $ wajig status | grep 3.2.3-2 | grep 3.3.0-1 | cut -f1 > list\n  $ wajig installfile list\n\n\nREMOVING PACKAGES\n\nOnce a package is installed you can remove it with:\n\n  $ wajig remove <package name>         (apt-get remove)\n\nOnce again, you can list multiple packages to remove with the one\ncommand.\n\nA remove will not remove configuration files (in case you have done\nsome configuration of the package and later re-install the package).\nTo get rid of the configuation files as well use:\n\n  $ wajig purge <package name>          (apt-get --purge remove)\n\n\nDISPLAYING APT LOG\n\nWhenever a package is installed, removed, upgraded, or downgraded\nwith either apt, aptitude, or synaptic, a log found at\n/var/log/apt/history.log is updated. To display it, run:\n\n  $ wajig list-log                      (cat /var/log/apt/history.log)\n\n\n\nCHECKING WHAT'S CHANGED BEFORE INSTALLING\n\nWhen you install an updated package it is sometimes useful to know\nwhat's changed.  The apt-listchanges package provides a mechanism\nwhereby when updating packages you will be given a chance to review\nthe changelog of the package and then decide whether to continue with\nthe upgrade. Simply install the apt-listchanges package to turn this\nfeature on.\n\n\nINSTALLING ALIEN (RedHat/Fedora/CentOS) PACKAGES\n\nRedHat has quite an installed base of users. Some packages\n(particularly commercial packages) are available as RedHat packages\n(with the rpm extension). These can usually be installed in Debian\nwith little effort.  The alien package is required to convert the rpm\ninto deb format which can then be installed. This is taken care of by\nwajig:\n\n  $ wajig rpminstall gmyclient-0.0.91b-1.i386.rpm\n\n\nPUTTING PACKAGES ON HOLD\n\nOccasionally, and particularly if you are following the unstable\nrelease, some packages are broken for various reasons.  This was the\ncase with the package cdrecord in unstable.  This package was compiled\nwith kernel 2.4.n and had some kernel specific issues that were done\ndifferently with kernel 2.2.n. At compile time one or the other\noptions was chosen (but not both!). Thus the newer binary versions of\ncdrecord would not run on a system using kernel 2.2.n. One solution is\nto build a Debian package of cdrecord using the wajig build command.\nAnother is to reinstall an older version that worked and then place\nthe package on hold with:\n\n  $ wajig hold cdrecord\n\nA wajig upgrade would not try to upgrade this package.\n\n\nBUILDING PACKAGES\n\nSometimes the binary distribution of the package is configured or\ncompiled with options that don't suit you. Or it may be compiled for a\nmore recent release than that which you are using and does not work\nfor your release. Normally you would then be left on your own to\nretrieve the source of the package, configure and compile it, then\ninstall it into /usr/local/.  This is then outside of the Debian\npackage management system, which is just fine.  But there are better\nsolutions. One is to tune a specific source package and build a Debian\npackage from it. The second is to specify general configuration\noptions for your system and then rebuild many packages with these\noptions.\n\n\nBUILDING PACKAGES FROM SOURCE\n\nYou can download the source code for any Debian package from the\nDebian archive. You can then modify it and generate your own .deb file\nfor installation. To download the source of a Debian package you will\nneed deb-src lines in your /etc/apt/sources.list file, such as the\nfollowing:\n\n  deb-src http://ftp.debian.org/debian unstable main contrib non-free\n\nGenerally you can add the '-src' to copies of pre-existing 'deb'\nlines.\n\nTo retrieve and unpack a source Debian package use:\n\n  $ wajig source <package names>                (apt-get source)\n\nNote that you can list several packages and grab all of their sources.\n\nThe source command downloads a .tar.gz file and a .dsc file for the\npackage. The .tar.gz file contains the source code and associated\nfiles. The .dsc file contains test information that is used by the\npackaging system. The source command will also extract the contents of\nthe .tar.gz archive into a subdirectory consisting of the package name\nand version.\n\nTo go one step further and also configure, compile and generate a\ndefault Debian .deb package from source code (useful if you need to\ncompile a package for your setup specifically) then use instead:\n\n  $ wajig build <package names>\n\nThis conveniently installs the needed build-dependencies for you.\n\nIf you need to modify the source in some way and rebuild a package:\n\n $ wajig update\n $ wajig build ncftp\n $ dpkg-source -x ncftp_3.0.2-3.dsc\n $ cd ncftp-3.0.2\n $ fakeroot dpkg-buildpackage -b -u\n\nNote that for some packages, you will get permission-related build errors.\nReplace 'fakeroot' with 'sudo' in such cases.\n\n\nBUILD ARCHITECTURE-OPTIMISED PACKAGES\n\nThe apt-build package, a front-end to apt-get, provides a general\nsolution to build Debian packages tuned (or optimised) for your\narchitecture.\n\n  $ wajig install apt-build\n\nYou will be asked for some options, and these go into\n/etc/apt/apt-build.conf:\n\n  build-dir = /var/cache/apt-build/build\n  repository-dir = /var/cache/apt-build/repository\n  Olevel = -O2\n  march = -march=pentium4\n  mcpu = -mcpu=pentium4\n  options = \" \"\n\nThe built packages will be placed into\n/var/cache/apt-build/repository, an can be accessed with the\nstandard Debian package tools by adding the following line to the top\nof /etc/apt/sources.list (which can be done during the\ninstallation of apt-build:\n\n  deb file:/var/cache/apt-build/repository apt-build main\n\nYou will need deb-src entries in your /etc/apt/sources.list file to be\nable to obtain the source packages.\n\nBeing a front-end to apt-get, your first apt-build command might be to\nupdate the list of known available packages (particularly if you have\njust added a deb-src entry to /etc/apt/sources.list), although the\nfollowing is equivalent:\n\n  $ wajig update\n\nYou can then start building packages:\n\n  $ sudo apt-build install most\n\nYou can manage a collection of packages to be recompiled and installed\ninstead of obtaining the default compiled versions. Create the file\n/etc/apt/apt-build.list to contain a list of such packages\nand then:\n\n  $ sudo apt-build world\n\nOne way to get a full list of installed packages is:\n\n  # dpkg --get-selections | awk '{if ($2 == \"install\") print $1' \\\\\n    > /etc/apt/apt-build.list\n\nBe sure to edit the list to remove, for example, gcc! Then a:\n\n  $ sudo apt-build world\n\nwill recompile and optimise all packages.\n\n\nPINNING DISTRIBUTIONS\n\nWith the Debian packaging system you can specify that your packages\ncome by default from one distribution but you can override this with\npackages from other distributions. The concept is called pinning and\nafter it is set up you can have, for example, testing as\nyour default release and then include unstable in\n/etc/apt/sources.list and install cdrecord from unstable with:\n\n  # apt-get install cdrecord/unstable\n\nThe following /etc/apt/preferences makes apt-get use testing unless it\nis overridden, even though there are entries for unstable in\n/etc/apt/sources.list:\n\n  Package: *\n  Pin: release a=testing\n  Pin-Priority: 900\n\n  Package: *\n  Pin: release o=Debian\n  Pin-Priority: -10\n\n\nRECONFIGURE PACKAGES\n\n  $ wajig reconfigure debconf           (dpkg-reconfigure  debconf)\n\nAn alternative where you can specify a particular front end to use for\nthe configurator is:\n\n  # dpkg-reconfigure --frontend=dialog debconf\n\n\nSETTING DEFAULT APPLICATIONS\n\nDebian has a system of alternatives for various commands (or\nfunctionalities).  For example, the editor command could be nano or\nnvi, or one of a large number of alternative editors.  You can update\nthe default for this command with:\n\n  $ wajig updatealts editor             (update-alternatives --config editor)\n\nAnother common alternative is x-window-manager. You can get a list of\nall alternatives with:\n\n  $ wajig listalts                      (ls /etc/alternatives/)\n\nThe information is maintained in the directory /etc/alternatives/.\n\nBUGS\n\nIf you find a problem with your system and think it might be a bug, use:\n\n  $ wajig bug                           (reportbug)\n\nThis will allow you to view bugs recorded against packages and also\nallow you to add a new bug report to the Debian bug reporting system.\n\nOtherwise visit the Debian email lists at http://lists.debian.org/ and\nsearch for the problem there.  The advice one gets here is generally\nof high quality.\n\n\nMANAGING DAEMONS OR SERVICES\n\nIn addition to managing the installed packages wajig also allows you\nto start, stop, reload, and restart services (which are often provided\nby so called daemons---processes that run on your computer in the\nbackground performing various functions on an on-going basis).  The\ncommands all follow the same pattern:\n\n  $ wajig restart <service name>        (/etc/init.d/<service> restart)\n\nThe start and stop commands are obvious.  The restart command\ngenerally performs a stop followed by a start.  The reload command\nwill ask the daemon to reload its configuration files generally\nwithout stopping the daemon, if this is possible.  The services you\ncan specifiy here depend on what you have installed.  Common services\ninclude:\n\n  apache Web server\n  cron   Regular task scheduler\n  exim   Email delivery system\n  gdm    The Gnome Windows Display Manager (for logging on)\n  ssh    The Secure Shell daemon\n\nGenerally, daemons are started at system boot time automatically.\n\n\nALTERNATIVE APPLICATIONS\n\nDebian has a mechanism for dealing with applications that provide the\nsame functionality.  We describe here how this mechanism works and how\nyou can use it to tune your installation.\n\nIf you have more than one variant of emacs installed (e.g., emacs19,\nemacs20, and xemacs) then you can configure which one you get by\ndefault with:\n\n  $ wajig updatealts emacs\n\nYou will be asked to choose from a list of alternatives.\n\nTo specify which window manager to use as the system default:\n\n  $ wajig updatealts x-window-manager\n\nSuppose the window-manager you want to use as the default is not\nlisted as available. You can install it with:\n\n# update-alternatives --install /usr/bin/x-window-manager \\\\\n                      x-window-manager /usr/bin/mywm PRIORITY\n\nWhere PRIORITY is a number higher than the highest existing priority\nfor the x-window-manager alternative.  You can get a list of\npriorities with:\n\n# update-alternatives --display x-window-manager\n\nTo remove a Window Manager:\n\n# update-alternatives --remove x-window-manager /usr/bin/mywm\n\n\nPACKAGE ARCHIVES\n\nLocal Cache\n\nWhen packages are installed from the Debian Archives the corresponding\ndeb files are stored in /var/cache/apt/archive.  This can become quite\npopulated with older versions of packages and we can clean out these\nolder versions with:\n\n  $ wajig autoclean                     (apt-get autoclean)\n\nWarning: It is sometimes useful to have older versions of packages\nhanging around if you are tracking the unstable release.  Sometimes\nthe newer versions of packages are broken and you need to revert to an\nolder version which may not be available from the Debian archives, but\nmight be in your local download archive.\n\nIf you get short of disk space then you might want to remove all the\ndownloaded deb files (not just the older versions of downloaded files)\nwith:\n\n  $ wajig clean                         (apt-get clean)\n\nTo remove files immediately after they have been installed edit\n/etc/apt/apt.conf:\n\n  // Things that effect the APT dselect method\n  DSelect\n  {\n    Clean \"auto\";   // always|auto|prompt|never\n  ;\n\nHistoric Packages\n\nTo obtain any package version that might have appeared in the archive\ninclude http://snapshot.debian.net in your package sources list and\nthe name of the package you are interested in. To update your sources\nlist run:\n\n  $ wajig editsources\n\nto add the following line:\n\n  deb http://snapshot.debian.net/archive pool sed\n\nThen you can do, for example:\n\n  $ wajig available sed\n  $ wajig install sed=4.1.2-1\n\n\nMAINTAINING A DISTRIBUTION ARCHIVE\n\nDownloaded Debian packages are placed into /var/cache/apt/archive. You\ncan have the files moved into a local hierarchy that mirrors a\nstandard Debian distribution hierarchy.  Then you can point the\n/etc/apt/sources.list to this local archive by using the file://\nformat.\n\nTo set up a local machine as a local (partial) mirror of the Debian\narchive, wajig will use the apt-move package.\n\nEdit /etc/apt-move.conf to set the DIST to match your system (default\nis stable):\n\n  DIST=unstable\n\nThe wajig command move will then move any packages in your\n/var/cache/apt/archives into the Debian mirror being created:\n\n  $ wajig move\n\nYou can actually create a complete mirror with:\n\n  # apt-move mirror\n\nThese commands place the packages into /mirrors/debian. To make it\navailable on your web server simply:\n\n  # cd /var/www\n  # ln -s /mirrors pub\n\nThe file /etc/apt/sources.list can then be updated to point to the new\narchive as the first place to check for packages (place this lines\nfirst in the file):\n\n  deb http://athens/pub/debian unstable main contrib non-free\n\n\nAll of this might happen on your server (called athens in this\nexample) and other machines on your local network can then access the\nlocal archive by adding the above line to /etc/apt/sources.list.\n\nIf your server is not the most up to date machine (since you may not\nwant to run the risk of your server becoming unstable), you can rsync\nall packages in /var/cache/apt/archives on other machines to the\nserver and then run the move command on the server:\n\n  # rsync -vr friend:/var/cache/apt/archives/ /var/cache/apt/archives/\n  # ssh friend wajig clean         (apt-get clean)\n  # wajig move                     (apt-move update)\n\nIn fact, on your server you could use the following Python script\nsaved to file /root/apt-archive.py to automate this for each of the\nhosts on the network:\n\n    #!/usr/bin/env python\n    import os\n\n    hosts = ['friend', 'cargo']\n    archive = '/var/cache/apt/archives/'\n\n    for h in hosts:\n        os.system('rsync -vr %s:%s %s' % (h, archive, archive))\n        os.system('ssh %s wajig clean' % h)\n\n    os.system('wajig move')\n\nThen set the script up to run:\n\n  # chmod u+x apt-archive.py\n\nand run it as required:\n\n  # ./apt-archive.py\n\nDepending on how you have ssh set up this may ask for your password\nfor each connection.  To avoid this, you can use public/private keys\nwith no passphrase, and then the script could be run automatically\nusing cron each morning by copying the executable script to\n/etc/cron.daily/apt-archive. (Scripts in /etc/cron.daily with a py\nextension are not run, so be sure to rename the file as suggested\nhere.)\n\nLocal Debian Package Cache\n\nTo set up a local Debian cache of deb files that you've created or\ndownloaded separately:\n\n  # mkdir -p /usr/local/cache/dists/local/local/binary-i386\n  # cp *.deb /usr/local/cache/dists/local/local/binary-i386\n  # cd /usr/local/cache\n  # dpkg-scanpackages dists/local/local/binary-i386 /dev/null \\\\\n  $ dists/local/local/binary-i386/Packages\n\nThen add the following line to /etc/apt/sources.list:\n\n  deb file:/usr/local/cache local local\n\n\nOTHER COMMANDS\n\nThese may work their way into wajig.\n\nYou can use the apt-get --download-only option of apt-get to download\nthe files for an install without actually unpacking and setting up the\npackages. For example:\n\n  # wajig update\n  # apt-get --download-only dist-upgrade\n\nIn this way you are able to leave the download unattended and when you\nare ready you can monitor the unpacking and setup.\n\nIf things go wrong somewhere then apt may be able to help:\n\n  # apt-get --fix-broken dist-upgrade\n\nbut if things still don't work, you may need to use dpkg directly to\nremove and isntall packages.\n\nSynchronising Two Installations\n\nThe package system maintains a list of all packages installed (and\nde-installed). You can access this list, save it to a file, and use it\nto mark those same packages for installation (or deinstallation) on\nanther machine:\n\n# dpkg --get-selections > dpkg-selections\n# dpkg --set-selections < dpkg-selections\n# apt-get dselect-upgrade\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Debian/Ubuntu admin management tool",
    "version": "4.1.1",
    "project_urls": {
        "Homepage": "https://wajig.togaware.com"
    },
    "split_keywords": [
        "debian",
        "ubuntu",
        "admin"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b027c1c2f87c20cb0e2d5857201096735e31e37d618a2e31115bbf8880f6eb4",
                "md5": "972378b72638efb7503812119533a373",
                "sha256": "a069f0139e2634dbcecf65e75ae34a0f3f2f1f72fc5f2af43d10f974beb06e0c"
            },
            "downloads": -1,
            "filename": "wajig-4.1.1.tar.gz",
            "has_sig": false,
            "md5_digest": "972378b72638efb7503812119533a373",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 90143,
            "upload_time": "2023-07-09T06:02:48",
            "upload_time_iso_8601": "2023-07-09T06:02:48.082083Z",
            "url": "https://files.pythonhosted.org/packages/5b/02/7c1c2f87c20cb0e2d5857201096735e31e37d618a2e31115bbf8880f6eb4/wajig-4.1.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-09 06:02:48",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "wajig"
}
        
Elapsed time: 0.09470s