Before You Begin
⚠️ WARNING: Data Loss
Uninstalling Xi-Text removes all queued jobs, printer definitions, and spool files. Backup any data you need to preserve before proceeding.
⚠️ WARNING: Service Interruption
Uninstallation stops all printing services. Schedule uninstallation during maintenance windows.
Backup Important Data
Before uninstalling, save critical configuration:
bash
# Create backup directory BACKUP_DIR="/usr/textsave/final-$(date +%Y%m%d-%H%M%S)" mkdir -p "$BACKUP_DIR/Scripts" cd "$BACKUP_DIR" # Export jobs (if needed) export PATH=$PATH:/usr/spool/xi_distrib/Text cjlist -D /usr/spool/spd spshed_jfile Jcmd Scripts # Export printers cplist -D /usr/spool/spd spshed_pfile Pcmd # Export users dumpsuser > Ucmd # Backup printer setup files tar czf printer-setups.tar.gz /usr/spool/printers/ # Backup configuration files cp /etc/Xitext-config . cp /etc/Xitext-hosts .
Determine Installation Type
Check which installation method was used:
bash
# Check for RPM installation rpm -q xitext_legacy_standard # Check for tarball installation ls -d /usr/spool/xi_distrib/Text 2>/dev/null
If RPM query succeeds, you have an RPM installation. If distribution directory exists, you have a tarball installation.
Uninstalling RPM Installation
Step 1: Stop Xi-Text
bash
# Stop the service sstop -y # Verify stopped ps aux | grep spshed
Step 2: Remove RPM Package
bash
# Uninstall package rpm -e xitext_legacy_standard # Verify removal rpm -q xitext_legacy_standard
Expected output: package xitext_legacy_standard is not installed
Step 3: Clean Up IPC Resources
RPM removal doesn't automatically clean IPC resources:
bash
# Check for remaining IPC resources
ipcs -m | grep "0x5869"
ipcs -q | grep "0x5869"
ipcs -s | grep "0x5869"
# Remove shared memory segments
ipcs -m | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -m "$id"
done
# Remove message queues
ipcs -q | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -q "$id"
done
# Remove semaphores
ipcs -s | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -s "$id"
done
Step 4: Remove Data Directories (Optional)
RPM uninstall leaves data directories intact for safety:
bash
# Remove spool directory rm -rf /var/spool/spd/ # Remove printer definitions rm -rf /usr/spool/printers/ # Remove distribution directory (if present) rm -rf /usr/spool/xi_distrib/Text/
Step 5: Remove Configuration Files (Optional)
bash
# Remove system configuration rm -f /etc/Xitext-config rm -f /etc/Xitext-hosts # Remove service files (systemd) rm -f /etc/systemd/system/xitext.service systemctl daemon-reload # Remove service files (SysV init) rm -f /etc/init.d/xitext rm -f /etc/rc*.d/*xitext
Step 6: Remove System User (Optional)
bash
# Remove spooler user if no longer needed userdel spooler # Remove group if it exists and is empty groupdel spooler
Uninstalling Tarball Installation
Step 1: Stop Xi-Text
bash
# Stop the service sstop -y # Verify stopped ps aux | grep spshed
Step 2: Locate UNINSTALL Script
Tarball installations include an UNINSTALL script:
bash
# Typical location cd /usr/spool/xi_distrib/Text # Verify script exists ls -l UNINSTALL
Step 3: Run UNINSTALL Script
bash
# Execute uninstaller as root ./UNINSTALL
The UNINSTALL script removes:
- Binary files from user programs directory
- Internal programs from system directory
- Help files and resources
- Symbolic links
If UNINSTALL script is not available, proceed with manual removal below.
Step 4: Manual Removal (If UNINSTALL Unavailable)
Remove User Programs
User programs typically in /usr/local/bin or /usr/bin:
bash
# List of Xi-Text user programs cd /usr/local/bin # Adjust path if needed # Remove user commands rm -f spr spq sqlist sqchange spstat rm -f spuser sppri spadd spdel splist rm -f spstart sstop sphalt spok spnok rm -f spinter spexec spjobdump rm -f xt-checklic xt-vwrite # Remove symlinks if they exist rm -f sp*
For non-bash shells (sh, ksh on older Unix):
sh
# POSIX-compatible removal
cd /usr/local/bin
for prog in spr spq sqlist sqchange spstat spuser sppri \
spadd spdel splist spstart sstop sphalt spok \
spnok spinter spexec spjobdump; do
rm -f "$prog"
done
Remove Internal Programs
Internal programs typically in /usr/spool/progs:
bash
cd /usr/spool/progs # Remove scheduler and daemons rm -f spshed spd xtnetserv # Remove internal utilities rm -f spdinit spjobdump spwrite dosspwrite rm -f spmdisp sppwchk spexec # Remove help files rm -f *.help int-config # Remove utility scripts rm -f ptr_alert sendudp psbanner longlist shortlist remove
Remove Spool Directory
bash
# Remove spool files and directory rm -rf /var/spool/spd/ # Or if different location rm -rf /usr/spool/spd/
Remove Printer Definitions
bash
# Remove all printer configurations rm -rf /usr/spool/printers/
Remove Distribution Directory
bash
# Remove distribution files rm -rf /usr/spool/xi_distrib/Text/
Step 5: Clean Up IPC Resources
Same as RPM installation:
bash
# Check for IPC resources
ipcs -m | grep "0x5869"
ipcs -q | grep "0x5869"
ipcs -s | grep "0x5869"
# Remove if present (use POSIX-compatible loop)
ipcs -m | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -m "$id"
done
ipcs -q | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -q "$id"
done
ipcs -s | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -s "$id"
done
Step 6: Remove Configuration Files
bash
# Remove system configuration rm -f /etc/Xitext-config rm -f /etc/Xitext-hosts
Step 7: Remove System Startup
For systemd systems:
bash
systemctl stop xitext systemctl disable xitext rm -f /etc/systemd/system/xitext.service systemctl daemon-reload
For SysV init systems:
bash
/etc/init.d/xitext stop rm -f /etc/init.d/xitext rm -f /etc/rc*.d/*xitext
For other init systems, remove appropriate startup files.
Step 8: Remove System User
bash
# Remove spooler user (if not needed by Xi-Batch) userdel spooler # Remove group if empty groupdel spooler
Verification Steps
After uninstallation, verify complete removal:
Check Processes
bash
# No Xi-Text processes should be running ps aux | grep -E 'spshed|spd|xtnetserv'
Expected: No results (or only the grep command itself)
Check IPC Resources
bash
# No Xi-Text IPC resources should remain ipcs -a | grep "0x5869"
Expected: No results
Check Files
bash
# Check user programs directory ls -l /usr/local/bin/sp* 2>/dev/null # Check internal programs ls -l /usr/spool/progs/sp* 2>/dev/null # Check spool directory ls -d /var/spool/spd/ 2>/dev/null ls -d /usr/spool/spd/ 2>/dev/null # Check printer definitions ls -d /usr/spool/printers/ 2>/dev/null # Check distribution directory ls -d /usr/spool/xi_distrib/Text/ 2>/dev/null
Expected: All commands should return "No such file or directory"
Check Configuration
bash
# Check system configuration files ls -l /etc/Xitext-* 2>/dev/null
Expected: No results
Check Services
bash
# Check systemd systemctl status xitext 2>&1 | grep -q "could not be found" # Check SysV init ls /etc/init.d/xitext 2>/dev/null ls /etc/rc*.d/*xitext 2>/dev/null
Expected: Service not found, init scripts don't exist
Check User
bash
# Check if spooler user exists id spooler 2>&1
Expected: "no such user" (unless Xi-Batch is still using it)
Platform-Specific Considerations
HP-UX
IPC removal:
sh
# HP-UX may use different awk
ipcs -m | grep "0x5869" | while read type id key mode owner group; do
ipcrm -m "$id"
done
User removal:
sh
# HP-UX userdel /usr/sbin/userdel spooler
AIX
IPC removal:
sh
# AIX ipcs output format differs
ipcs -m | grep "0x5869" | awk '{print $2}' | while read id; do
ipcrm -m "$id"
done
User removal:
sh
# AIX user removal rmuser spooler
Solaris
IPC removal:
sh
# Solaris ipcs format
ipcs -m | grep "0x5869" | nawk '{print $2}' | while read id; do
ipcrm -m "$id"
done
User removal:
sh
# Solaris userdel /usr/sbin/userdel spooler
Older Unix Without Bash
Use POSIX shell compatible commands throughout:
sh
#!/bin/sh
# POSIX-compatible uninstall verification
# Check processes
ps -ef | grep spshed | grep -v grep
# List files to remove
for dir in /usr/local/bin /usr/spool/progs; do
if [ -d "$dir" ]; then
cd "$dir"
ls sp* 2>/dev/null
fi
done
# IPC cleanup (POSIX)
ipcs -m | grep "0x5869" | while read line; do
id=$(echo "$line" | awk '{print $2}')
ipcrm -m "$id"
done
Troubleshooting
"Permission denied" errors : Ensure running as root or with sudo privileges
IPC resources won't delete : Verify no Xi-Text processes running. Force kill any remaining processes before IPC cleanup.
Files remain after uninstall : Check for files in non-standard locations. Use find to locate:
bash
find / -name "sp*" -user spooler 2>/dev/null find / -name "*xitext*" 2>/dev/null
RPM removal fails : Try force removal: rpm -e --nodeps xitext_legacy_standard
UNINSTALL script not found : Use manual removal procedure. Check distribution directory or backup media for script.
Cannot remove user (user busy) : Other processes or services may be using spooler user. Identify with:
bash
ps aux | grep spooler lsof -u spooler