Best solution: I found a very interesting command stty. From man stty: stty - change and print terminal line settings.
In tty1 I ran this:
sudo stty rows 20. Now my tty screen is limited to 20 rows, which allows for 20 rows on the screen. It works with sudo apt-get install libreoffice -s, and any other command.
Now, it doesn't seem to work with gnome-terminal or xterm, but right now I'm working on solution. Probably, have to change something in .bashrc file.
A minimalistic solution to the problem would be to use less or more or pg. For example ,
if i simulate installing libreoffice,
sudo apt-get install libreoffice -s | less
That way you have last line replaced with : , and still be able to run the command. The only draw pack is that you have to press enter, to skip to the next page in case of pg or next line in case of less/more.
Another solution is this to use
tail command. This will work well if you don't care about the whole output, but only first and ending part of it. Just as the name suggests, these allow you to see either top(head) of the output or end (tail) of the output. For example,
sudo apt-get install libreoffice -s | head -n20;
Which will give you first 20 lines of the output (default is 10, from what i found out).
To get last 20 lines same thing with tail:
sudo apt-get install libreoffice -s | tail -n20;
The problem with these solutions, though, is that if you are running some interactive command with long output, this will probably prevent you from interacting with that commmand, so keep this in mind.