Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

Man is displaying groff control characters after I compiled a later version of groff. For example, when I try to view groff's man page:

GROFF(1)                    General Commands Manual                   GROFF(1)

       groff - front-end for the groff document formatting system

       ESC[1mgroff ESC[22m[ESC[1m-abcegijklpstzCEGNRSUVXZESC[22m] [ESC[1m-d ESC[4mESC[22mcsESC[24m] [ESC[1m-D 
ESC[4mESC[22margESC[24m] [ESC[1m-f ESC[4mESC[22mfamESC[24m] [ESC[1m-F ESC[4mESC[22mdirESC[24m]
             [ESC[1m-I ESC[4mESC[22mdirESC[24m] [ESC[1m-K ESC[4mESC[22margESC[24m] [ESC[1m-L ESC[4mESC[22marg
ESC[24m] [ESC[1m-m ESC[4mESC[22mnameESC[24m] [ESC[1m-M ESC[4mESC[22mdirESC[24m] [ESC[1m-n ESC[4mESC[22mnumESC[24m] [ESC[1m-o ESC[4mESC[22mlistESC[24m]
             [ESC[1m-P ESC[4mESC[22margESC[24m] [ESC[1m-r ESC[4mESC[22mcnESC[24m] [ESC[1m-T ESC[4mESC[22mdevESC[24m] [ESC[1m-w ESC[4mESC[22mnameESC[24m] [ESC[1m-W ESC[4mESC[22mnameESC[24m] [ESC[4mfileESC[24m ...]
       ESC[1mgroff -h ESC[22m| ESC[1m--helpESC[0m
       ESC[1mgroff -v ESC[22m| ESC[1m--version ESC[22m[ESC[4moptionESC[24m ...]

       This  document  describes the ESC[1mgroff ESC[22mprogram, the main front-end for the
       ESC[4mgroffESC[24m document formatting system.  The ESC[4mgroffESC[24m program and macro suite is
       the implementation of a ESC[1mroffESC[22m(7) system within the free software collec-
       tion GNU <http://www.gnu.org>.  The ESC[4mgroffESC[24m system has  all  features  of
share|improve this question
There isn't any /var/cache/man when I checked. –  rake Jun 20 '13 at 21:31

1 Answer 1

Your man command is using groff to format the page with ANSI color escape sequences (ISO 6429), and your pagination program (likely more or less) is expanding these unprintable characters instead of passing them unchanged to your terminal screen.

To tell less (for example) not to expand these ANSI sequences, use the -R or --RAW-CONTROL-CHARS option. You can often do this by setting the option you want in the LESS environment variable or perhaps using the PAGER environment variable:

$ LESS='-R' man groff
$ PAGER='less -R' man groff

It might also be an incorrect directive to the underlying groff, causing groff (or grotty) to issue ANSI escapes when you don't really want them. You can tell man not to use the escapes by using something like this:

$ man --ascii groff

The man page for grotty talks in detail about your options for fixing the problem.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.