Is there a way to differentiate between System packages and Manually installed packages in Linux?

Dharmender Lodhi

I am trying to write a script where I can tell whether the package is a pre-installed or it was installed by user.

And also can we have way to get to know that following are the dependencies of the package 'X'

Chris Maes

on the rpm level you cannot really know. Depending on the package manager you use there might be some information stored there.

Note that this only works if the user ran the installation commands with sudo. If he became root, you'll never know who did it.

Yum

yum history

gives you a list of transactions and which user launched the command.

Dnf

dnf history

gives you a list of transactions, but doesn't list the user by default. You can however run:

dnf history info <ID>

and then you will see the user who launched the command

zypper

there is no way to know this afaik.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to find manually installed packages?

From Dev

Meteorite change "manually" installed packages to automatically installed

From Dev

How to compare installed Linux packages between two machines

From Dev

Why are almost all packages marked as manually installed?

From Dev

How to list installed packages manually from backports?

From Dev

Generating list of manually installed packages and querying individual packages

From Dev

How to find installed deb packages needlessly marked as manually installed

From Dev

Get the list of packages that are not installed on a Debian system

From Dev

pycurl version conflict between installed packages

From Dev

What is the difference between similar installed PHP packages?

From Dev

In Makefile, How to verify if required Linux packages are installed

From Dev

List currently installed unstable packages (Gentoo Linux)

From Dev

Can I make pacman aware of packages installed manually?

From Dev

Accidentally run "apt install *" now all packages are marked as "manually installed"

From Dev

How to view a list of packages that were manually installed without their dependancies

From Dev

Mark all autoremovable packages as manually-installed in one command

From Dev

Debian: make the package manager aware of manually installed packages

From Dev

manually install npm packages?

From Dev

Is there a way to manually check which extra packages are going to be removed?

From Dev

Is there a way to manually check which extra packages are going to be removed?

From Dev

Is there an efficient way to share structure between golang packages?

From Dev

Is there an easier way to uninstall packages in Arch Linux?

From Dev

How can I determine which packages I have installed via homebrew and which were installed manually?

From Dev

purge all packages manually installed via apt-get from the moment you installed the Ubuntu OS

From Dev

how to generate list of installed packages from a full system backup?

From Dev

how to find which packages are installed system-wide in NixOS?

From Dev

Are system packages installed into /usr allowed to be broken by source installations into /usr/local?

From Dev

Where are the installed R packages?

From Dev

How to remove installed packages

Related Related

  1. 1

    How to find manually installed packages?

  2. 2

    Meteorite change "manually" installed packages to automatically installed

  3. 3

    How to compare installed Linux packages between two machines

  4. 4

    Why are almost all packages marked as manually installed?

  5. 5

    How to list installed packages manually from backports?

  6. 6

    Generating list of manually installed packages and querying individual packages

  7. 7

    How to find installed deb packages needlessly marked as manually installed

  8. 8

    Get the list of packages that are not installed on a Debian system

  9. 9

    pycurl version conflict between installed packages

  10. 10

    What is the difference between similar installed PHP packages?

  11. 11

    In Makefile, How to verify if required Linux packages are installed

  12. 12

    List currently installed unstable packages (Gentoo Linux)

  13. 13

    Can I make pacman aware of packages installed manually?

  14. 14

    Accidentally run "apt install *" now all packages are marked as "manually installed"

  15. 15

    How to view a list of packages that were manually installed without their dependancies

  16. 16

    Mark all autoremovable packages as manually-installed in one command

  17. 17

    Debian: make the package manager aware of manually installed packages

  18. 18

    manually install npm packages?

  19. 19

    Is there a way to manually check which extra packages are going to be removed?

  20. 20

    Is there a way to manually check which extra packages are going to be removed?

  21. 21

    Is there an efficient way to share structure between golang packages?

  22. 22

    Is there an easier way to uninstall packages in Arch Linux?

  23. 23

    How can I determine which packages I have installed via homebrew and which were installed manually?

  24. 24

    purge all packages manually installed via apt-get from the moment you installed the Ubuntu OS

  25. 25

    how to generate list of installed packages from a full system backup?

  26. 26

    how to find which packages are installed system-wide in NixOS?

  27. 27

    Are system packages installed into /usr allowed to be broken by source installations into /usr/local?

  28. 28

    Where are the installed R packages?

  29. 29

    How to remove installed packages

HotTag

Archive