---
name: "aptitude-robot-session"
section: "8"
platform: "linux"
package: "aptitude-robot"
version: "1.5.5-1.1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/aptitude-robot-session"
---

# aptitude-robot-session(8)

call aptitude-robot non-interactively

## NAME

aptitude-robot-session - call aptitude-robot non-interactively

## SYNOPSIS

aptitude-robot-session

## DESCRIPTION

aptitude-robot-session is a helper script meant to be run from cron or init scripts.  It will call aptitude-robot with some options suitable for non-interactive use.  It will also redirect all output (STDERR and STDOUT) to LOGFILE defined in `"/etc/default/aptitude-robot"`.

## CONFIGURATION

There are a few configuration options that can be defined in `"/etc/default/aptitude-robot"`.

- LOGFILE

  the name of the file where all the output of aptitude-robot is collected. Defaults to `"/var/log/aptitude-robot.log"`

- LOG\_SESSION

  the name of the file where the session log is accumulated. aptitude-robot-session will append its PID to this file in order not to overwrite a log file left over from a crashed earlier invocation.  If aptitude-robot-session finishes properly it will append the session log to LOGFILE and delete the session log.

- SESSION\_REPORT\_COMMAND

  optional command invoked with the session log as the only argument at the end of an aptitude-robot-session run.  This can be used to file reports to monitoring systems or support mail addresses.

- MAX\_LOGFILES\_SIZE\_BLOCKS

  file size limit in blocks for the session log.  This prevents endless loops if a package installation continues to ask the same question for which no terminal is available to provide an answer.

  But be aware that this limit also affects \_all\_ daemons started or restarted during the aptitude-robot-session run, including e.g. the OpenSSH daemon which again will propagate the limit to its remote login sessions. Use with care.

- POST\_SESSION\_HOOK

  a command that is run at the end of a successful aptitude-robot-session.  E.g., use it for apt-get clean.

## EXIT STATUS

aptitude-robot-session exits with 0 on success, 1 if dpkg is locked, 2 if apt failed to fetch some APT repositories.

## BUGS

The non-interactive nature of aptitude-robot-session may trigger the condition reported in https://bugs.launchpad.net/ubuntu/+source/aptitude/+bug/257279

## SEE ALSO

[**aptitude-robot**(8)](/aptitude-robot/8.md), [**aptitude**(8)](/aptitude/8.md)

## AUTHORS

Elmar S. Heeb \<elmar@heebs.ch\> and Axel Beckert \<abe@debian.org\>
