#!/bin/bash

# File containing the package list
PACKAGE_LIST="packages.txt"

# Process the package list: remove duplicates and tidy package names
cat "$PACKAGE_LIST" | \
  sort | \
  uniq | \
  sed -E 's/\(.*\)//g' |  # Remove anything inside parentheses (e.g., version, architecture)
  sed 's/\([^(]*\)/\1/'   # Strip any remaining parentheses and keep only the core name

Updated: