2 Package History
Anagnostakis Ioannis edited this page 2026-06-25 03:48:43 +03:00
This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Package History

slacker history prints a newest-first timeline of every package change on the box — installed, upgraded, reinstalled, removed — each with its local date and the source repository or build tag slacker attributes it to.

It is reconstructed from the pkgtools administrative directories under ADM_DIR (packages/ + removed_packages/), so it reflects every change on the system — including those made by other tools (slackpkg, sbopkg, slpkg, sbotools, plain installpkg/upgradepkg/removepkg), not just slacker.

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#161b22','primaryBorderColor':'#1f6feb','primaryTextColor':'#e6edf3','lineColor':'#6e7781','fontFamily':'monospace'}}}%%
flowchart LR
  P["ADM_DIR/packages/<br/>(current installs)"]:::green --> H
  R["ADM_DIR/removed_packages/<br/>(removed + -upgraded- records)"]:::grey --> H
  H{{"slacker history"}}:::blue --> T["chronological timeline<br/>install · upgrade · reinstall · remove"]:::green
  classDef grey fill:#0d1117,stroke:#6e7781,color:#8b949e;
  classDef blue fill:#0d1117,stroke:#1f6feb,color:#e6edf3;
  classDef green fill:#0d1117,stroke:#2ea043,color:#e6edf3;

Usage

slacker history                       # everything, newest first
slacker history emacs                 # one package (exact name)
slacker history --installed           # only what is installed now, with install dates
slacker history --removed             # only what left the system (removed or upgraded away)
slacker history --upgraded            # only upgrade / reinstall events
slacker history --last 20             # the 20 most recent events
slacker history --since 2026-06-01    # events on or after a date

Filters combine, e.g. slacker history --installed --since 2026-06-01. Output is paged on a terminal (press q to quit).

What a line looks like

2026-06-24 06:54  ↑ upgraded     emacs   30.2-3 → 30.2-4   [slackware]
2026-06-22 17:52   removed      vlc     3.0.23-3alien     [extras]
2026-06-22 17:49  + installed    aircrack-ng  1.7-7cf      [conraid]
2026-06-24 06:49  ↻ reinstalled  emacs   30.2-4            [slackware]

Each row: local date, the change, the package, the version (an upgrade reads old → new), and the attributed source repo/tag.


How it reads the data

Record on disk Meaning
packages/<id> installed now; its mtime is the install time
removed_packages/<id> (plain) removed with removepkg; its ctime is the removal time
removed_packages/<id>-upgraded-<timestamp> the old version replaced by upgradepkg

About the inferred upgrade target

Plain removepkg records share one filename per package id, so a later removal overwrites an earlier one — some history is genuinely lost by the package tools themselves. When an upgrade's successor record was overwritten this way, slacker shows the new version inferred from that package's next known entry (old → new) rather than a bare old → ?. The -upgraded- records carry a unique timestamp and are never lost, so true upgrade chains are reconstructed exactly.


Notes

  • history is read-only and needs no root.
  • --installed reads the current packages/ directory directly, so it is always complete even if the last action on a package was an upgrade.
  • Names match exactly: slacker history aircrack shows nothing if the package is aircrack-ng.