How to find out why something got installed?

Hello World,

Just did a system update and now I notice a new folder in my home directory called “go” which after a quick search on the net seems to be a programming language designed by google… What the heck is that doing there?! :face_with_monocle:

I certainly never asked for it(the whole point of switching to Linux and installing Brave was to distance myself from companies like microshit and google), and I very much doubt Linux with it’s mentality is now using/reling on programming languages created by companies such as google, specially since one of the subfolders is named “telemetry”, wtf?!?! :rage:

So are there any console commands(or other ways) to figure out exactly why this got installed and are there any programs(or packages or whatever you call them) that I have installed that are actually using/need it?

Thank you.

Pacman logs its actions in /var/log/pacman.log.

Look in there to see when the package you are talking about got installed.

You can also use pactree to have a look at what depends on it.

It may have been installed as a dependency of something you have installed from the repo or AUR.

Also as a friendly suggestion, pay attention to the list of packages that get installed or updated in your system. Part of the the Arch’s user experience is to learn how your system works and maintain it yourself.

You can always use man command line to view manual pages fro a command.
Example: man pactree

Or if you prefer: https://man.archlinux.org/

Also, the following site has a wealth of information: ArchWiki

Check what packages you installed from the AUR. There is a high probability one package needs go for compiling the program.

1 Like

Is it possible it got installed in todays update because a day or so ago I installed adb drivers(aka android-tools 35.0.1-3 from the extra repository)?
That is the only thing I can think of that has anything to do with google at all…

The pacman log doesn’t help much sadly, it does tell me that go-tools (4:0.23.0-1) and go (2:1.22.5-1) got installed, but not why. And if I try pactree go or pactree -r go in the terminal it doesn’t do anything, just returns the word “go”… :frowning:

You could search something like this:

grep "installed go" /var/log/pacman.log

to find the date when go was (first) installed. Then around that line you might find the package that caused go to be installed.

This way I found pacseek has go as a dependency. You might find some other package.

Edit: this might help too (but a bit complicated…):

pacman -Qi $(pacman -Qq) | grep -n "^Depends On" | grep -w go

It shows if go depends on any of the installed packages.

Check pacman -Qm to list your foreign packages for example those from AUR.

Look them up in AUR pages to see which one depends on GO. Most probably it is the make dependency of something you installed from there.

1 Like

Ok, I tried all your suggestions, here is the result(let me know if you prefer some pics of the console so you can see the colors, makes for an easier read imo):

[vikings@VIKINGSKINGDOM ~]$ grep "installed go" /var/log/pacman.log
[2024-08-01T16:03:16+0300] [ALPM] installed gobject-introspection-runtime (1.80.1-3)
[2024-08-01T16:44:53+0300] [ALPM] installed go-tools (4:0.23.0-1)
[2024-08-01T16:44:55+0300] [ALPM] installed go (2:1.22.5-1)
[2024-08-01T16:44:56+0300] [ALPM] installed gobject-introspection (1.80.1-3)
[2024-08-03T22:14:08+0300] [ALPM] installed gom (0.5.2-1)
[2024-08-10T14:47:23+0300] [ALPM] installed goverlay (1.2-1)
[2024-09-05T20:07:04+0300] [ALPM] installed goffice (0.10.57-2)
[2024-09-06T08:23:29+0300] [ALPM] installed go (2:1.23.0-1)
[2024-09-06T08:23:29+0300] [ALPM] installed go-tools (4:0.24.0-2)
[vikings@VIKINGSKINGDOM ~]$ pacman -Qi $(pacman -Qq) | grep -n "^Depends On" | grep -w go
[vikings@VIKINGSKINGDOM ~]$ pacman Qm
error: no operation specified (use -h for help)
[vikings@VIKINGSKINGDOM ~]$ -h
bash: -h: command not found
[vikings@VIKINGSKINGDOM ~]$ pacman -h
usage:  pacman <operation> [...]
operations:
    pacman {-h --help}
    pacman {-V --version}
    pacman {-D --database} <options> <package(s)>
    pacman {-F --files}    [options] [file(s)]
    pacman {-Q --query}    [options] [package(s)]
    pacman {-R --remove}   [options] <package(s)>
    pacman {-S --sync}     [options] [package(s)]
    pacman {-T --deptest}  [options] [package(s)]
    pacman {-U --upgrade}  [options] <file(s)>

use 'pacman {-h --help}' with an operation for available options
[vikings@VIKINGSKINGDOM ~]$ pacman -Qm go
[vikings@VIKINGSKINGDOM ~]$ pacman -Qm <go>
bash: syntax error near unexpected token `newline'
[vikings@VIKINGSKINGDOM ~]$ pacman -Qm
amdonly-gaming-libva-mesa-driver-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-mesa-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-mesa-vdpau-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-opencl-clover-mesa-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-opencl-rusticl-mesa-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-vulkan-mesa-layers-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-vulkan-radeon-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
amdonly-gaming-vulkan-swrast-git 24.3.0_devel.193243.19ff16387a0.d41d8cd-1
appimagelauncher 2.2.0-8
bauh 0.10.7-1
brave-bin 1:1.69.162-1
cppo 1.6.9-2
flacon 11.4.0-1
fvs 0.3.4-2
icoextract 0.1.5-1
kdotool-git 0.2.1.ff8bc44-1
lib32-amdonly-gaming-libva-mesa-driver-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-mesa-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-mesa-vdpau-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-opencl-clover-mesa-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-opencl-rusticl-mesa-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-vulkan-mesa-layers-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-vulkan-radeon-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
lib32-amdonly-gaming-vulkan-swrast-git 24.3.0_devel.193245.bf9a17e2d56.d41d8cd-1
libdbusmenu-qtilities6-git r367.bd5c6a3-1
linux-steam-integration 0.7.3-8
lutris-git 0.5.17.r259.g7ead527-1
mission-center 0.5.2-1
nomacs 1:3.19.0-1
ocaml-biniou 1.2.2-7
ocaml-compiler-libs-repackaged 0.17.0-1
ocaml-easy-format 1.3.4-4
ocaml-ocplib-endian 1.2-8
ocaml-ppx_here 1:0.17.0-2
ocaml-ppx_let 0.17.0-2
ocaml-ppxlib 0.33.0-1
ocaml-react 1.2.2-4
ocaml-yojson 2.1.2-1
ocs-url 3.1.0-7
open-fuse-iso 1.1-1
opensnitch-ebpf-module 1.6.5-3
patool 2.4.0-1
python-pathvalidate 3.2.1-1
python-pypresence 4.3.0-2
python-steamgriddb 1.0.5-2
qdiskinfo 0.3-1
qt-sudo 2.0.1-1
snapd 2.65.1-1
vkbasalt-cli 3.1.1-2
win2xcur 0.1.2-1
[vikings@VIKINGSKINGDOM ~]$ 

LE: Ok, so I just finished going through the list pacman -Qm spit above and putting each entry into the aur website to see what dependecies it has. And the only one that seems to need go and go-tools is snapd 2.65.1-1 however:

  1. Both go and go-tools have (make) at the end.
  2. In the “Required by” section the only things I have installed on my system that might use it have (optional) at the end.

Given all that pretty please!! tell me that means they where only used/needed to build snapd and now I can uninstal/remove/purge them from my system without any issues?
And if yes, is yay -R go and yay -R go-tools enough or do I need to do something special?

In my experience, if you try to uninstall a dependency that’s still in use pacman will tell you what it is that relies on it before asking if you definitely want to kill it.

So personally, I’d just run a quick backup of your choice via timeshift or whatever your poison is then run the uninstall command anyway :slight_smile:

However, (make) on the AUR signifies that the package is only required as a dependency during installation, so it should be safe to remove anyway if that’s the only thing you have with it attached.

FWIW, Go telemetry is extensively documented and largely targeted at developers rather than everyday users, to the point that the default setting is “off” with telemetry only stored on the local device unless a user explicitly opts in to submit their data.

Yeah, running e.g.

sudo pacman -R go go-tools

without really continuing the remove should let you see which packages need those. That should easily give you an idea why the go stuff was installed.

[again, 20 years of windows mentality makes me say the following] Yeah, right, “off”, until things suddenly get turned to on in an update without even telling you… F google and microsoft and all their BS!
Rest of the info was interesting, thank you.

Ok @manuel I ran the command, didn’t warn me about anything so I just removed them, console ouput below. However that go folder is still present in my home directory with everything in it, should I just shift+delete it, or do I have to restart for those pacman changes to take effect, or what?

[vikings@VIKINGSKINGDOM ~]$ sudo pacman -R go go-tools
[sudo] password for vikings: 
checking dependencies...

Package (2)  Old Version  Net Change 

go           2:1.23.0-1   -223,23 MiB
go-tools     4:0.24.0-2    -80,40 MiB

Total Removed Size:  303,64 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/2) removing go-tools                                                             [------------------------------------------------] 100%
(2/2) removing go                                                                   [------------------------------------------------] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[vikings@VIKINGSKINGDOM ~]$

LE: Also, for my own education, when removing a program, is there an argument I can add to the pacman command to make it check and also remove stuff that was used only for compiling(or whatever you call it) that program and isn’t used by anything else?
Like maybe sudo pacman -R -s whatever.app or something? Perhaps -u as well?

If GO & co. got installed in your system as make dependencies of a package you installed from AUR, next time there is an update to that package and you will need to build it again, GO & co. will be installed in your system again.

So be prepared for that :wink:

1 Like

It is possible that some AUR package you built & installed caused go stuff (install the the packages to the system and create folders in your $HOME).
But if it is not 100% sure what created the $HOME stuff, maybe you can first simply rename the go folder in your $HOME, and run your usual things as a test. If nothing bad happens, then you very likely can delete the renamed go folder from your $HOME.

And as @pebcak suggested, this can happen again, so please look at the pacman output to see if go stuff is going to be installed/upgraded again.

Ah crap… :rage: :sob: :face_vomiting:

Fine, I’ll add go to the list of things I usually keep an eye out for when updating. And I’ll do that with renaming, thank you.

What about the LE stuff I added at the end of the post about pacman commands, any comments/insights/suggetions about that part?

Read your LE post better… snapd has go and go-tools as make dependencies meaning they are needed only when building a particular package. And tools like yay (if I remember correctly) should ask if you want to keep the make dependencies after the build or not. Probably you got them this way.

1 Like

Aahh, I see. Well I did that because(as far as I know) when you are new at something and not sure what you are doing, it’s best to follow the defaults.

And when you get asked that question with yay the default(I’m guesing since it’s capitalized) is to keep them… :frowning: I’ll be more careful in the future when installing stuff, thanks.

Ok, then(again for my own education/curiosity) could I pretty please get some examples of situations where you would want to use -R -s -u?

I assume that’s the default because you already installed a particular package, and may upgrade it later, needing the tools again.

$ man pacman
...
REMOVE OPTIONS (APPLY TO -R)
       -c, --cascade
           Remove all target packages, as well as all packages that depend on one or more target packages. This operation is recursive and must be used with
           care, since it can remove many potentially needed packages.

       -n, --nosave
           Instructs pacman to ignore file backup designations. Normally, when a file is removed from the system, the database is checked to see if the file
           should be renamed with a .pacsave extension.

       -s, --recursive
           Remove each target specified including all of their dependencies, provided that (A) they are not required by other packages; and (B) they were not
           explicitly installed by the user. This operation is recursive and analogous to a backwards --sync operation, and it helps keep a clean system
           without orphans. If you want to omit condition (B), pass this option twice.

       -u, --unneeded
           Removes targets that are not required by any other packages. This is mostly useful when removing a group without using the -c option, to avoid
           breaking any dependencies.

...

Note that those additional flags may cause something that you didn’t want to do. That’s why it is a very good idea to look at pacman’s output before committing to the changes.
Also, I’d personally recommend to remove only those packages that you know for sure are no more needed. Too often removing a package/packages do more harm than good. Nowadays we usually have quite much disk space to accommodate stuff.
But if the disk space runs out because of the package cache, that is the place to start removing old stuff, see man paccache.

Ouch, I see, k I’ll be careful, promise. :wink:

True, once I get the rest of my new hardware and reformat my ssd to have only Linux installed space won’t be an issue anymore.

BUT!(again curse my winshit background) I have to ask:
in win if you do that for too long, especially if you don’t use a third party program to uninstall stuff(cause the built in win tools suck and leave a lot of crap behind), eventually the system will become slow, possibly buggy, maybe completely unresponsive in extreme cases…
Won’t similar stuff happen in Linux sooner or later if you don’t do any “spring cleaning” from time to time?

You should stop using Brave then…Brave builds upon Chromium, the “open source core” of Google Chrome, which is mostly developed by Google.

Any before you think about switching to Firefox: Mozilla nowadays mostly still exists because of money it gets from Google/Alphabet.

Keeping disk space in good limits is up to you!
Linux itself does not cause disk space to fill up, except maybe the package cache may become very large if you don’t manage it (with e.g. paccache).
If you download large stuff like videos or large packages and never remove them, surely you can fill up the disk easily, and that will eventually make the system slower.

So better manage the system sensibly. It is not rocket science, but needs a small amount of consistent care.

No, it doesn’t work like that in linux.

The packages themselves are completely separate from their configuration and working files in most cases. Also, there is no registry or really anything similar to that.

Removing packages like go, only really frees a small amount of disk space. Unless you are very low on disk space, there won’t be any performance difference.

1 Like