Solaris Common Messages and Troubleshooting Guide

rmdir: string: Directory not empty

Cause

The rmdir(1) command can only remove empty directories. The directory with the name appearing after the first colon in the message still contains some files or directories.

Action

Use rm(1) instead of rmdir(1). To remove this directory and everything underneath it, use the rm -ir command to descend the directory recursively, and respond to requests to delete each element. To remove the directory and all its contents without prompts for approval, use the rm -r command.