VMware ESXi and vSphere Cluster Management

Using dselect to Manage Debian Packages

Learn how dselect works with dpkg and APT to select, install, configure, upgrade, and remove Debian packages in legacy environments.

dselect is an interactive, text-mode interface for managing Debian software packages. It provides menus for choosing package states, refreshing package information, installing software, completing configuration, and removing packages.

dselect is closely related to dpkg. dpkg is the foundational Debian package-management system that installs, removes, and tracks individual package files. dselect records the package states you want, then relies on dpkg and an access method such as APT to obtain and apply those changes.

dselect can work with packages available through configured Debian package sources, including network repositories and registered removable installation media. It is primarily a legacy tool and is rarely the preferred interface on current Debian systems. It remains useful when maintaining older systems, following older procedures, or investigating legacy package-selection state.

How dselect fits into Debian package management

A Debian package is an archive containing software files plus metadata and maintenance scripts. A dependency is a relationship in which one package requires or constrains another package. dselect displays and records desired package states, but it is not itself the low-level package installer.

  • dselect: A text-based interactive interface for selecting and managing Debian packages.
  • dpkg: Installs, removes, configures, and tracks individual Debian package files.
  • APT: Obtains package metadata and package files from configured software sources, while helping resolve dependencies.
  • Package repository: A source containing package files and indexes that describe available software versions and dependencies.

The distinction between desired state and immediate action is important. Marking a package for installation in dselect does not necessarily download or install it immediately. The later Install phase applies the selection.

Package source configuration

Package availability depends on the APT sources configured for the system. The traditional configuration file is /etc/apt/sources.list. Modern Debian systems may also use source-list fragment files in /etc/apt/sources.list.d/.

A source can be a network or local APT mirror, such as a repository available over a network or from a local filesystem. Another possibility is removable installation media, such as a Debian CD-ROM. These are different sources and require different dselect access methods.

Before package information can be refreshed, select an access method that matches the source actually available to the machine. An APT method is appropriate when repositories are configured for APT. The CD-ROM method is appropriate when the required package indexes and package files are available on registered optical media.

Check source configuration before starting a troubleshooting session. Incorrect release names, obsolete mirrors, disabled repository components, unreachable networks, or missing media can all make packages unavailable.

Starting dselect

Launch dselect from a terminal:

dselect

Administrative privileges are normally required for operations that change the system. On systems with sudo configured, use:

sudo dselect

dselect is keyboard-driven and menu-based. It is not a graphical package manager. Read the on-screen instructions and help text for navigation, selection keys, confirmation, and returning to the main menu. Avoid assuming that selecting an item has already changed the installed system.

The dselect workflow

The main workflow is ordered as follows:

  1. Access: Choose how dselect obtains packages and package information.
  2. Update: Refresh local package indexes from the selected source.
  3. Select: Mark the desired installed state for packages.
  4. Install: Retrieve and install or upgrade selected packages.
  5. Config: Complete configuration for packages left unconfigured.
  6. Remove: Process installed packages marked as no longer wanted.

The sequence matters. Access determines where package data comes from. Update supplies current metadata. Select records desired package states. Install applies installation and upgrade requests. Config finishes packages whose post-installation configuration did not complete. Remove processes packages marked for deinstallation.

Completing a phase normally advances dselect to the next applicable phase. You can return to earlier phases when necessary, but do not bypass workflow steps unless you understand the consequences. For example, selecting a newly available package before updating indexes may produce incomplete or inaccurate package information.

dselect workflow phases

PhaseMain purposeInput or prerequisiteResultTypical issue
AccessChoose the package source method.A reachable repository, local source, or available media.dselect knows how to obtain package data and files.The method does not match the available source.
UpdateRead repository indexes.Valid source definitions and reachable sources or usable media.The local package-availability database is refreshed.Indexes cannot be downloaded or read.
SelectRecord desired package states.Current package indexes.Packages are marked for installation, upgrade, retention, or removal.Dependencies or conflicts alter choices.
InstallApply installation and upgrade requests.Valid selections and obtainable package files.Packages are retrieved and unpacked or installed.Downloads fail or dependencies cannot be satisfied.
ConfigRun pending package configuration.Packages that were unpacked but not fully configured.Maintainer scripts and package setup complete where possible.A configuration script fails or needs administrator input.
RemoveProcess packages marked as unwanted.Removal selections and a review of dependencies.Selected packages are deinstalled.Dependent or important packages would also be affected.

Access phase

The Access phase chooses the method dselect uses to obtain packages. The method must match the package source available to the machine.

Access methodAppropriate sourceTypical use caseRequirements
aptAPT-configured network or local repositories.Installing from a Debian mirror or another APT-compatible source.Valid source definitions, reachable repositories, and usable APT configuration.
cdromRegistered removable optical media.Installing packages from Debian installation media without relying on a network mirror.The correct media must be available, readable, and registered for package access.

Choose apt when the system should use repository entries in /etc/apt/sources.list or related source-list fragments. Choose cdrom when the package source is the appropriate registered CD-ROM media. Selecting CD-ROM does not make network repositories available, and selecting APT does not substitute for missing installation media.

Update phase

The Update phase reads package index files from the selected source. These indexes are commonly named Packages and may be compressed. They describe package names, versions, architectures, dependencies, and other metadata.

dselect uses the refreshed indexes to create or update its local package-availability database. This database lets the Select phase represent which packages and versions are available. If a repository has recently gained a package or a newer version, Select cannot accurately show that information until Update has completed successfully.

Update commonly depends on all of the following:

  • Correct repository definitions and release information.
  • A reachable network, working DNS, and an available mirror when using APT.
  • Correctly inserted and readable media when using CD-ROM access.
  • Repository components that contain the package you need.
  • Package indexes compatible with the system release and architecture.

Select phase

The Select phase represents the desired installed state. You browse the package list and mark packages for actions supported by the interface, including installation, upgrade, retention, or deinstallation.

Retention means keeping the current state rather than requesting a change. Deinstallation means removing a package while potentially retaining some configuration files. Selection is a planning operation: it records requests but does not by itself download or install package files.

Dependencies can change the result of a selection. Selecting one package may cause required packages to be selected as well. dselect can also warn about conflicts, unavailable versions, or selections that cannot be satisfied together. Review those messages rather than accepting a large change without understanding it.

Package states to understand

  • Install: The package should be present on the system.
  • Upgrade: A newer available version should replace the installed version when the request can be satisfied.
  • Retain: Keep the current package state.
  • Deinstall: Remove the package from the installed system.
  • Unconfigured: The package may be unpacked, but its required configuration stage has not completed.

The exact symbols and key commands depend on the dselect screen and version. Use the on-screen legend and help text to interpret package-state markers.

Install phase

The Install phase applies selected installation and upgrade requests. Packages are retrieved through the configured access method and then processed by Debian package-management tools, including dpkg.

During this phase, dependency handling and package ordering are important. A package may not install if a required dependency is unavailable, if selected versions conflict, or if package downloads fail. Installation can also stop after unpacking if a maintainer script or another configuration step reports an error.

Do not treat a download failure as a package-selection problem automatically. First determine whether the repository is reachable, whether the requested package version exists for the release and architecture, and whether the access method is correct.

Config phase

Many packages configure automatically as part of installation. The Config phase handles packages left in an unconfigured state, often after an interrupted operation, a failed maintainer script, or an unanswered configuration prompt.

Configuration may ask administrative questions or run package-provided setup scripts. Read prompts and error messages carefully. If a script fails, repeating Config without correcting the underlying issue may produce the same failure.

Remove phase

The Remove phase processes installed packages marked as no longer wanted. Before confirming, review which other packages depend on the selected package and whether the selected item belongs to a larger software stack.

Package removal and purging are different. Deinstallation removes the package itself but may retain configuration files. A purge removes the package and its package-managed configuration data where Debian package behavior supports that distinction. If retained configuration is not wanted, a separate purge action may be necessary.

Practical example: install from a network repository

  1. Verify that APT repository entries are present and appropriate in /etc/apt/sources.list and any relevant source-list fragment files.
  2. Start the interface with sudo dselect.
  3. Open Access and choose the APT-based access method.
  4. Run Update to refresh package indexes.
  5. Open Select, find the desired package, and mark it for installation. Read and resolve dependency prompts or warnings.
  6. Run Install to retrieve and apply the request.
  7. If packages remain unconfigured, run Config and inspect any reported errors.
  8. Use Remove only for packages explicitly marked as unwanted and reviewed for dependency consequences.

Practical example: install from Debian installation media

  1. Insert or otherwise make the correct Debian package media available.
  2. Open Access and choose the CD-ROM access method.
  3. Run Update so dselect reads package information from the media.
  4. Use Select to mark packages available from that source.
  5. Run Install, then complete Config if any packages remain unconfigured.

Practical example: remove an unwanted package

  1. Use Select to mark the package for deinstallation.
  2. Review dependency and removal consequences before leaving the selection screen.
  3. Apply the request through the appropriate later workflow phase, including Remove.
  4. Decide whether retained configuration files are acceptable or whether a separate purge operation is needed.

Practical example: complete interrupted package setup

  1. Identify packages reported as unpacked or unconfigured.
  2. Use the Config phase to attempt completion.
  3. Read the package-manager or maintainer-script error if configuration fails.
  4. Correct the underlying dependency, filesystem, service, or configuration problem, then retry Config.

Troubleshooting dselect

Update cannot obtain package lists

Likely causes include incorrect or obsolete repository entries, network or DNS failure, an unavailable mirror, an incorrect access method, or missing or unreadable installation media.

  • Validate the configured package sources.
  • Confirm network connectivity or media availability.
  • Select an access method appropriate to the source.
  • Retry Update after correcting the source.

A desired package does not appear in Select

The package indexes may not have been updated, the needed repository component or media may be absent, or the package may not be available for the system release or architecture.

  • Run Update after confirming source configuration.
  • Check that the relevant repository component is enabled.
  • Verify release and architecture compatibility.

Installation stops because of dependency conflicts

Incompatible versions, unavailable dependencies, conflicting selections, or mixed repository sources can prevent installation.

  • Review dependency messages in Select and Install.
  • Adjust selections to resolve conflicts.
  • Ensure sources provide compatible package versions.
  • Avoid combining unrelated distribution releases without a deliberate upgrade plan.

Packages remain unconfigured

An interrupted operation, failed configuration script, invalid response to a prompt, or unmet runtime requirement may leave packages unconfigured.

  • Run Config.
  • Read the reported package error.
  • Correct the underlying system or dependency issue before retrying.

Removal would affect unexpected packages

Other installed packages may depend on the selected package, or the selected item may be part of a larger software stack. Review package relationship information before applying the change. Cancel or revise the selection if important packages would be removed.

Modern alternatives

Current Debian administration more commonly uses APT command-line tools such as apt or apt-get, and some users prefer aptitude as an interactive package-management frontend.

ToolInterface stylePrimary roleCurrent relevance
dselectKeyboard-driven text interface.Record package selections and coordinate package operations.Legacy; mainly encountered on older systems and in historical procedures.
dpkgCommand-line package tool.Install, remove, configure, and track individual package files.Foundational and still essential underneath higher-level tools.
apt-get or aptCommand-line APT frontends.Refresh metadata, obtain packages, resolve dependencies, and perform routine administration.Common current interfaces for Debian package management.
aptitudeInteractive text interface and command-line tool.Browse packages, manage selections, and handle dependency-aware operations.A more common interactive alternative to dselect in many workflows.

Understanding dselect is still valuable when maintaining a legacy installation, interpreting package-selection state created by older tools, or following documentation that uses its Access, Update, Select, Install, Config, and Remove workflow.

Exam-relevant summary

  • dselect is an interactive text-mode frontend, not the low-level package database itself.
  • dpkg performs foundational package installation, removal, configuration, and tracking.
  • APT obtains package metadata and package files from configured sources.
  • /etc/apt/sources.list is the traditional APT source configuration file; modern systems may also use source-list fragments.
  • The normal workflow is Access, Update, Select, Install, Config, Remove.
  • Update refreshes package indexes; Select records desired states; Install applies installation and upgrade requests.
  • Deinstallation may retain configuration files, while purging removes package-managed configuration data where applicable.
  • Dependency warnings and removal consequences should be reviewed before changes are confirmed.

For a concise reference to the interface, see dselect package-management workflow.