Skip to content

Package Operations

ensure_package.sh

Package-related ensure functions, currently only for Debian/Ubuntu systems and APT packages.

Functions

ensure_package_cache_recent

Ensure that the package cache is up-to-date (younger than 3 hours), updating it if necessary. This is called automatically by ensure_package_up_to_date, so you usually don't need to worry about it.


ensure_package_up_to_date

Ensure that a package is installed and up to date. If no package is specified, all installed packages are updated.

Examples

  • Update system & install firefox
    ensure_package_up_to_date  # Update all packages
    ensure_package_up_to_date firefox  # Install or update Firefox
    
Arguments
  • {package_name...}:

    The name of the package to ensure is installed.