Skip to main content

SPAM - A Software PAckage Manager

Ok let's be honest, it's not really a package manager, but merely a wrapper that presents a uniform command-line interface to them. Across Linux distros, flatpaks, firmware updates, and other Unixy things.

Usage & Features

👉 Easy to use every day, There's less to type due to built-in aliases. For example, to operate on the foo package:

⏵ spam -h               # note usage and cmd list

⏵ spam up               # short for `spam update; spam upgrade`
⏵ spam in foo           # or install
⏵ spam rm foo           # or uninstall
⏵ spam clean            # clean up downloads, autoremove

# Moar!
⏵ spam add foo://bar    # add repo
⏵ spam info foo         # or show
⏵ spam lsf foo          # or listfiles of pkg
⏵ spam pr /bin/foo      # or provides, what or who-owns file
⏵ spam pu foo           # or purge
⏵ spam se foo           # or search

⏵ spam up --refresh     # passes moar args to the first command

👉 Spam knows when to invoke sudo, so you rarely need to worry about it. Less to type for commands you may be running often across distros.

👉 It also can smooth over annoyances.

For example, by default it often passes --cacheonly to dnf subcommands so you don't have to wait to download the index before searching for a package. (The odds of a brand-new package being indexed in the last day or so is exceedingly small.) For apt it makes the update && dist-upgrade dance as simple as "up".

👉 It can run flatpak and/or firmware update commands as well. Whatever you'd like as part of repetitive management. Don't forget language library cleanup: pip cache purge, cargo cache -a, go cache clean, etc.

👉 It prints each command it runs, so you can learn how to do it on a package manager you may not be as familiar with. Also, if it wasn't able to do exactly what you want, it is easier to tweak the next command.

👉 Finally, if spam doesn't recognize a given sub-command, it will just pass it along unmodified. Muscle memory is not derailed in that case.

Support

Currently supports:

  • apt - Linux/Debian/Ubuntu/Mint
  • dnf - Linux/Fedora
  • opkg - Linux/OpenWRT (though may be phased out)
  • port - MacOS/MacPorts

With hopefully more to come as time allows. Probably works on the Linux Subsystem for Windows (LSW). ¯\_(ツ)_/¯

Install

This is the Python version. The name "spam" was taken on PyPi, so the package is called spam-util there instead.

pip install --user spam-util

There are no dependencies so faffing about with virtual-envs is unnecessary. It can then be run (as at the top of the page), though you may need to put ~/.local/bin into your path.

Perhaps you'd prefer a small binary? I've also ported this to Rust for fun.

Customization

This is done from a config.ini file in your $XDG_CONFIG_HOME folder. A default is placed there on first run, if it does not exist already:

⏵ edit ~/.config/spam/config.ini

May be useful to check it into a "dotfiles" repo.

Sections

Note: the sections and keys that are used specifically by spam are given a spam_ prefix. All others will be used to configure local commands. "Package manager" is abbreviated as PM below.

The important sections are these:

[spam_needs_sudo]
# where sub-commands that require sudo are listed
…

[spam_aliases]
# lists shortcuts, such as in for install, rm for remove
…

# sections, named to match the platform_ids from the
# /etc/os-release file, ID=… value are described below:

[fedora]
# The value of the spam_exec key sets the PM for the platform:
spam_exec = dnf
…

# sub-commands of the PM are listed below the section.
# If there are multiple commands to run; use semicolons:

clean = clean packages; autoremove


[debian]
# A "!" at the front of the command signifies it as stand-alone,
# meaning it is *not* a sub-command of the PM.
# Instead, spam will run the command as is:
…
add = !add-apt-repository

[ubuntu]
# A spam_extends allows a section to inherit from another:
spam_extends = debian

# Yet overrides may be placed into the child section as well:
foo = bar; baz

Hope you enjoy.

Metadata

Release files for spam-util 0.62

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spam-util 0.62
File Size Uploaded
spam_util-0.62.tar.gz 19.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spam-util 0.62
File Interpreter ABI Platform
spam_util-0.62-py3-none-any.whl Python 3 none any Details

Total release size: 39.1 kB

Release files / spam_util-0.62.tar.gz

Download URL spam_util-0.62.tar.gz
Size 19.5 kB
Tags Source
SHA-256 checksum
How to use checksums
dcd0259381b964c0435515bcd049a6267a73fcb44833c86c66d49c7e6e35109d
BLAKE2b-256 checksum
How to use checksums
20a0bdbed95162be4a964c265cbe4969abd19db394ef87ab8d85454f473753be
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / spam_util-0.62-py3-none-any.whl

Download URL spam_util-0.62-py3-none-any.whl
Size 19.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
238baccaa46c33a4275fb8d2b59a4e74c8017d985213435d93766bfb1352e9e1
BLAKE2b-256 checksum
How to use checksums
02c9fd175b7b3ae1f15f3a74dfd64b29e0737a705d6616dda6862279307b652c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.62 This release

2 release files

0.61

2 release files

0.58

2 release files

0.57

2 release files

0.56

2 release files

0.53

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page