A Python CLI tool for managing unattended-upgrades configuration on Debian/Ubuntu systems.
What it does:
- View repositories and Check status - Lists system's APT repositories and shows which repositories are enabled for unattended upgrades
- View patterns - Displays configured unattended-upgrades patterns and their repository matches
- Generate configuration - Suggests optimized unattended-upgrades patterns for all system repositories
Perfect for auditing your automatic update configuration or quickly generating a complete unattended-upgrades setup for your system if you have many additional repositories.
Requires Python 3.12+ and Debian/Ubuntu based system.
# Install pipx and system dependencies (pipx available in universe repository)
sudo apt install pipx python3-apt lsb-release
# Install apt-uu-config
pipx install --system-site-packages git+https://github.com/bcelary/apt-uu-config
# Run from anywhere (if you get permission errors, use sudo)
apt-uu-config <command>For development work, use uv for package management.
# Install system dependencies
sudo apt install python3-apt lsb-release
# Clone and install
git clone https://github.com/bcelary/apt-uu-config.git
cd apt-uu-config
uv venv --system-site-packages
uv sync
# Activate virtual environment
source .venv/bin/activate
# Run from anywhere (if you get permission errors, use sudo)
apt-uu-config <command>
# Deactivate when done
deactivateWhy not
uv tool install? This tool depends onpython3-apt, which is only available as a system package (not on PyPI). Theuv tool installcommand creates isolated environments without access to system packages.
Note: Run
sudo apt updatebefore using this tool to ensure repository information is current. If the tool fails with permission errors, prefix withsudo.
See which repositories are enabled for automatic updates:
apt-uu-config show repos
apt-uu-config show repos --enabled-only # Filter to enabled only
apt-uu-config show repos --format json # JSON outputSee configured patterns and their repository matches:
apt-uu-config show patterns
apt-uu-config show patterns --verbose # Show detailed matchesGenerate suggested unattended-upgrades patterns for your system:
apt-uu-config config # Show suggested patterns
apt-uu-config config --verbose # as above but with matching repository info as commentsThis analyzes all configured repositories and suggests appropriate patterns for /etc/apt/apt.conf.d/50unattended-upgrades. The tool only displays the suggested configuration - it does not modify any files. Copy the output into your configuration file manually.
--format [text|json]- Output format (default: text)--verbose- Show additional details--enabled-only/--disabled-only- Filter repositories--primary-arch-only- Filter to primary architecture
# Install system dependencies
sudo apt install python3-apt lsb-release
# Clone and setup
git clone https://github.com/bcelary/apt-uu-config.git
cd apt-uu-config
uv venv --system-site-packages
uv sync --group dev
uv run pre-commit install
# Run tests and checks
uv run pytest tests/
pre-commit run --all-filesContributions welcome! Please ensure tests pass (pre-commit run --all-files) before submitting a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.