Small interactive Debian apt helper update script
Find a file
2026-08-21 16:54:06 +00:00
.gitignore Initial aptt release 2026-05-10 10:38:16 +01:00
aptt Bump version to 0.5.7 to trigger update-check pickup of new git.het.net URL 2026-08-21 16:54:06 +00:00
LICENSE Initial aptt release 2026-05-10 10:38:16 +01:00
README.md Update self-reference URLs from Codeberg to self-hosted git.het.net 2026-08-21 16:48:18 +00:00

aptt

Small Debian/Ubuntu upgrade helper script focused on giving a clean overview before running a full upgrade.

Originally written for personal use on Debian sid/testing systems, but also tested on Debian stable, Proxmox hosts and LXC containers.

Philosophy

aptt intentionally tries to remain:

  • small
  • readable
  • dependency-light
  • shell-native
  • predictable

The goal is not to replace apt, but to provide a cleaner daily workflow around it.

Features

  • concise default output
  • simulated full-upgrade preview
  • held package detection
  • autoremove visibility
  • installed kernel overview
  • reboot-required detection
  • optional verbose mode
  • optional pager mode
  • optional unattended yes mode
  • self-update check
  • lightweight single-file shell script

Why?

On systems with many packages, especially sid/testing systems, normal apt upgrade output can become very noisy and easy to lose in scrollback.

aptt tries to provide:

  • a compact daily-driver mode
  • a more detailed inspection mode
  • a pager mode for large upgrades
  • a quick overview before committing to a full-upgrade

Requirements

aptt uses standard Debian tools.

For self-update checks and the installation examples below, curl is needed.

Install curl if needed:

sudo apt-get update
sudo apt-get install curl

Installation

Download directly:

sudo curl -fsSL -o /usr/local/bin/aptt \
https://git.het.net/dth/aptt/raw/branch/main/aptt

sudo chmod +x /usr/local/bin/aptt

Run as root:

sudo aptt

Usage

Normal mode

sudo aptt

Example:

apt update...
134 upgraded, 0 new, 0 removed, 0 not upgraded
0 held, 0 autoremove candidates, 3 installed kernels

Proceed to apt full-upgrade step? [y/N]

Verbose mode

Shows:

  • held packages
  • upgradable package list
  • autoremove details
  • installed kernels
  • simulated Inst/Conf dependency output
  • detailed needrestart output
sudo aptt -v

Pager mode

Verbose mode through a pager.

Useful for large upgrades on servers or sid/testing systems.

sudo aptt -p

Automatic yes mode

Automatically answers yes to apt prompts.

sudo aptt -y

Can also be combined:

sudo aptt -p -y

Optional tools

Some functionality improves when optional packages are installed:

  • less — pager support
  • needrestart — detect services and kernels needing a restart after upgrade
  • mosh — more resilient remote sessions during upgrades

Install optional tools:

sudo apt-get install less needrestart mosh

Notes

  • -p automatically enables verbose mode
  • container environments may show:
    • 0 installed kernels
    • reboot checks not applicable
  • aptt intentionally uses apt-get internally instead of apt to avoid unstable CLI warnings in scripts

Security note

aptt is intended to be run as root.

For that reason it does not auto-update itself. It only checks whether a newer version is available and leaves updating to the user.

Always review the script before installing or updating it.

Changelog

0.5.6

  • fix: suppress Hit/Get noise in verbose apt update output (show only warnings/errors/summary)
  • fix: add NEEDRESTART_SUSPEND=1 during full-upgrade to prevent needrestart running twice as dpkg hook
  • fix: remove redundant "Simulated full-upgrade" section from verbose output (actual upgrade output follows immediately)

0.5.5

  • fix: force LANG=C LC_ALL=C to ensure English apt output regardless of system locale
  • fix: held_count now uses grep -c instead of wc -l, preventing a false count of 1 on empty held list
  • fix: needrestart called with -r l (list mode) to prevent interactive hang in unattended -y mode
  • perf: single apt-get -s dist-upgrade simulation reused for both upgradable list and summary parsing, removing duplicate apt-get -s upgrade call

0.5.4

  • updated security consideration

Repository

https://git.het.net/dth/aptt

License

MIT