Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

When I am using "aptitude search", usually some results will be too long to be held in the console window. So are there any ways to display each result in multiple lines, so that I can see the full sentence? Thank you.

Snapshot: Snapshot of "aptitude search"

share|improve this question
up vote 5 down vote accepted

The simpler thing you can do, without using an option for the display format, is to change the display width.

aptitude uses as display width that of the terminal, or a fixed width of 80 if cannot determine the terminal width (i.e. when you pipe the result to another command).

You can change that with the -w option, for example:

aptitude -w 200 search pattern

Unfortunately, the field containing the package name expands considerably, and don't seem to be controllable through the format option (-F).

Also, could be useful to pipe the result to less -S: the -S option makes less to not wrap line longer than the terminal width. What seems to be cut can be seen using the right and left arrows.

share|improve this answer
Though less -S can use arrows to navigate but what cannot be seen still cannot be seen. – ziyuang Nov 18 '11 at 17:50
@ziyuang: remove -S and increment the number 200 (that was just an example) until you can see all you need. – enzotib Nov 18 '11 at 17:59
-w some_number works well. I mean piping to less does not change the line-chopping. – ziyuang Nov 18 '11 at 18:31
Thanks! This is nice that they thought about it in aptitude search; I was rather hoping to find a general solution, like passing a environment variable to any program writing to a pipe, to think it is in a terminal of width N. Anyway, this option is a must, when piping like aptitude search something | grep something_else. – Tomasz Gandor Jul 25 '14 at 10:57

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.