18:04 Lost desktop icon(s) after sudo apt-get upgrade

I have lost icon(s) after running sudo apt-get upgrade on my ubuntu 18.04.

The systems is also slower now.

Would you like to help me to solve this problem?error1logerror2

1 Answer

It is a bit difficult to name exact package name with icons.
So I provide single long command to reinstall all icons-related packages:

sudo apt install --reinstall $(dpkg -l | grep -i icon | grep ^ii | awk '{print $2}')

In the command above:

  • dpkg -l | grep -i icon | grep ^ii | awk '{print $2}' is a long pipe with:

    • dpkg -l shows the list of all packages;
    • grep -i icon shows all text lines with icons;
    • grep ^ii shows only installed packages;
    • awk '{print $2}' shows package names;
  • sudo apt install --reinstall $(...) is used to reinstall packages from the output of $(...) command.

You can consult man-pages - man dpkg, man apt, man grep, man awk for details about used commands.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like