求 Linux 版 Trae / Linux 相关吐槽

Environment

  • OS: Ubuntu 24.04.5 LTS

  • Package: trae 1.107.1-1776685406 (.deb)

Issue

Purging the removed trae package fails because its postrm script calls db_purge without sourcing the debconf functions.

Reproduction

  1. Install Trae from its .deb package.

  2. Uninstall Trae.

  3. Run sudo apt-get purge trae.

Error

/var/lib/dpkg/info/trae.postrm: line 33: db_purge: command not found
dpkg: error processing package trae (--purge):
 installed trae package post-removal script subprocess returned error exit status 127

Root cause

The postrm script contains:

if [ "$1" = "purge" ] && [ -e '/usr/share/debconf/confmodule' ]; then
    db_purge
fi

It does not source /usr/share/debconf/confmodule before calling db_purge.

Suggested fix

if [ "$1" = "purge" ] && [ -e '/usr/share/debconf/confmodule' ]; then
    . /usr/share/debconf/confmodule
    db_purge
fi

The amended script passes bash -n; successful purge has not yet been verified.

排序方式 :

成为第一条评论!

Nobody's responded to this post yet. Add your thoughts and get the conversation going.