Is it possible to color-code the output of apt?

6,155

Solution 1

Sure, it's easy. There are even tools for it. See https://stackoverflow.com/questions/981601/colorized-grep-viewing-the-entire-file-with-highlighting

I prefer rcg (Regex Colored Glasses).

Solution 2

As weird as it may sound: NO. While the excellent Arch Linux's pacman has built-in colorizing capabilities (and a few more available via 3rd-party wrappers) there's nothing similar for the aging apt/dpkg combo nor the relatively newer aptitude tool.

This is how pacman looks like using an external wrapper (mostly Yaourt or Packer, can't remember which one I was using at the time): http://i.imgur.com/ABk0u.png

Share:
6,155

Related videos on Youtube

Bryan Agee
Author by

Bryan Agee

Bryan has years of experience in business and software engineering/architecture, as well as those rare visionary qualities that make a great entrepreneur. He is an accomplished executive and leader with a passion for fostering new business growth and building long-term partnerships. His recent work focuses on platform and devops, driving continuous improvement in the three Xs: Developer eXperience, Operational eXcellence, and soX compliance.

Updated on September 18, 2022

Comments

  • Bryan Agee
    Bryan Agee over 1 year

    With the plethora of possibilities for most command-line tools, I would be surprised to learn that there is no way to colorize the info that apt-get, apt-cache, and related tools return. Even so, Googling was fruitless in this.

    Primarily, it would be nice to have the summary lines that show total count/size, and color-code each type of action count: eg, upgrades in blue, installs in green, held in yellow, and removed in red.