Sobes.tech
Junior

How to install packages via apt on stock Astra Linux?

sobes.tech AI

Answer from AI

To install packages via apt on standard Astra Linux, the same commands as in other Debian-based distributions are used. The main feature is the need to use Astra Linux repositories and possible specific dependencies.

  1. Update the list of available packages:
    sudo apt update  
    // Updates package indices from configured repositories.  
    
  2. Find a package (optional):
    apt search <package_name>  
    // Searches for packages containing the specified word in the name or description.  
    
  3. Install a package:
    sudo apt install <package_name>  
    // Downloads and installs the specified package and its dependencies.  
    
  4. Install multiple packages:
    sudo apt install <package_name1> <package_name2> ...  
    // Installs multiple packages with one command.  
    
  5. Install a package without confirmation (for automation):
    sudo apt install -y <package_name>  
    // Installs the package, automatically agreeing to all prompts.  
    
  6. Remove a package:
    sudo apt remove <package_name>  
    // Removes the package, leaving configuration files.  
    
  7. Remove a package and its configuration files:
    sudo apt purge <package_name>  
    // Removes the package and all related configuration files.  
    
  8. Remove unused dependencies:
    sudo apt autoremove  
    // Removes packages installed as dependencies that are no longer used.  
    

Before installation, ensure that the repositories for Astra Linux are correctly specified in /etc/apt/sources.list and /etc/apt/sources.list.d/ for your version and edition. In some cases, configuring access to repositories with additional security levels (e.g., repository subscription) may be required.