The version in /usr/local/bin/polybar
has most definitely not been installed via apt
. /usr/local/bin
is the location for software which is not part of your distribution, notably self-compiled software. Software installed via apt
will normally go to /bin
or /usr/bin
.
Just removing the manually installed version is indeed the recommended way of resolving this.
That may however comprise more than just the file /usr/local/bin/polybar
, for example libraries under /usr/local/lib
, a man page under /usr/local/man
or additional files under /usr/local/share
.
You may want to look around in your download folder(s) whether you can find the installation archive for that version. Its filename will probably start with polybar
, possibly contain the version number 3.5.0-12
, and end in an archive extension like .tar.gz
, .tgz
or similar. Inspect it to find out which files it may have installed and where.
To avoid breaking anything irrevocably you may start by renaming /usr/local/bin/polybar
instead of removing it, for example:
sudo mv /usr/local/bin/polybar /usr/local/bin/polybar.DELETEME
But again, check what other files belong to the program, and rename them, too.
Then check if the polybar
command now runs the correct version successfully.
If it does, you can actually delete the bad version with:
sudo rm /usr/local/bin/polybar.DELETEME
and so on for the other renamed files.