- Shell 100%
| .gitignore | ||
| aptt | ||
| LICENSE | ||
| README.md | ||
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 supportneedrestart— detect services and kernels needing a restart after upgrademosh— more resilient remote sessions during upgrades
Install optional tools:
sudo apt-get install less needrestart mosh
Notes
-pautomatically enables verbose mode- container environments may show:
0 installed kernels- reboot checks not applicable
- aptt intentionally uses
apt-getinternally instead ofaptto 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=Cto ensure English apt output regardless of system locale - fix:
held_countnow usesgrep -cinstead ofwc -l, preventing a false count of 1 on empty held list - fix:
needrestartcalled with-r l(list mode) to prevent interactive hang in unattended-ymode - perf: single
apt-get -s dist-upgradesimulation reused for both upgradable list and summary parsing, removing duplicateapt-get -s upgradecall
0.5.4
- updated security consideration
Repository
License
MIT