Advanced Command Flags

Advanced flags and options for package management and system maintenance commands

Package Management

apt install [package] -y

  • Auto-confirms installation
  • Skips interactive prompts

apt update --fix-missing

  • Updates with broken dependencies
  • Attempts to repair package lists

apt upgrade --dry-run

  • Simulates upgrade without changes
  • Shows what would be upgraded

Advanced Options

dpkg -i [package.deb] --force-depends

  • Installs ignoring dependencies
  • Use with caution

apt-get autoremove --purge

  • Removes unused packages completely
  • Deletes configuration files

apt search [term] --names-only

  • Searches only package names
  • Excludes descriptions

Information & Verification

dpkg -l | grep [package]

  • Lists installed packages matching term
  • Shows version and status

apt show [package] --no-install-recommends

  • Package details without suggestions
  • Clean dependency info

apt list --upgradable

  • Shows available package updates
  • Current vs available versions

System Maintenance

apt clean && apt autoclean

  • Cleans package cache completely
  • Removes partial downloads

Example Usage

1
2
3
4
5
6
7
# Safe system update
apt update && apt upgrade -y --dry-run
apt full-upgrade --autoremove

# Package investigation
dpkg -l | grep -i security
apt show firefox --installed