enter image description here

My immediate itch is the status line in apt upgrade / apt update that is a tone of yellow — as I use a light background it is almost unreadable...

I tried the apt man page but /colou?r give no matches.

I tried Google but what I found is something on StackExchange that gave a reply for a specific use case, different from mine, and no reference resource.

I'd like also a specific answer scratching my issue above, but what I'd like best is a pointer to some (un)official doc that explain the colors in apt and how to modify each default.

tx in advance

ps apt as the command line utility — the packaging infrastructure of Debian-like distros is Apt.

  • Your best bet here is to ask the apt maintainers themselves. They hang out on OFTC. I think the channel is #debian-apt. If I get around to it, I might ask them myself. If there is an option to do this, isn't undocumented. It's possible it is hardwired, but I agree, it should be configurable. So if it is hardwired, I recommend filing a wishlist bug on the Debian BTS. – Faheem Mitha Sep 18 '17 at 10:01
  • Just posted a comment on #debian-apt. If they have an answer, I'll update the question. – Faheem Mitha Sep 18 '17 at 10:15
  • @FaheemMitha I appreciate the interest that you have put in my question, thanks a lot. If something comes out of the apt chat, please post an answer. ciao – gboffi Sep 18 '17 at 14:04
  • I have to say that apt-get outputs a perfectly intelligible status line so a solution is to forget apt and keep using apt-get... – gboffi Sep 18 '17 at 14:09

Here is a partial answer, courtesy of David Kalnischkies of APT, on OFTC's #debian-apt.

apt update -o APT::Color::Yellow="$(printf '\e[36m')"

I think that color is cyan. For other colors, see https://github.com/shiena/ansicolor/blob/master/README.md

And to add that permanently to APT's config, you can do (for example):

printf "APT::Color::Yellow \"\e[36m\";\n" >> /etc/apt/apt.conf

Which will add what looks like the following (if you are reading the file using less) to /etc/apt/apt.conf:

APT::Color::Yellow "ESC[36m";

Thanks to @sebasth for coming up with that printf incantation.

  • Oh my... I have to change a named color and I have to insert a literal escape into a configuration file... but this is the apt developers, your answer is perfect for me. tx a lot. - - - - - - ps yellow is red :-) – gboffi Sep 18 '17 at 20:59
  • @gboffi: Not the perfect answer, agreed. – Faheem Mitha Sep 18 '17 at 21:24
  • no, your answer is good, it's apt that has a few problems and one has to jump through hoops to fix them... – gboffi Sep 18 '17 at 21:56
  • @gboffi David didn't seem particularly interested in doing anything with this, so I imagine the possibility of a config option is remote. But one could still file a wishlist bug. – Faheem Mitha Sep 18 '17 at 21:58

Each terminal emulator should have some color scheme editor.

Just set colors, which are unacceptable, to better one.

enter image description here


You can customize apt by editing the file /etc/apt/apt.conf

Examples are provided in /usr/share/doc/apt/examples/configure-index.gz

  • 1
    I'm happy with progress bar's color. I'd like to change the status line. — I'll have a look at /usr/share/doc/apt/examples/configure-index.gz – gboffi Sep 17 '17 at 19:04
  • If one googles apt change color the 1st result is askubuntu.com/a/445246 that contains Dpkg::Progress-Fancy::Progress-Bg "%1b[40m"; but I already knew that answer when I posted my question: that answer is not what I need. – gboffi Sep 17 '17 at 19:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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