You are not logged in.

#1 2017-02-25 09:15:55

Error1000
Member
Registered: 2017-02-25
Posts: 13

[Solved]How to list all packages that have never been opened or used?

So i wanted to clean my installation of arch and i wanted to remove all the unused packages because some of them come with other apps and i never used them. Is there any application/command that could list all the packages that were never used/opened?

Last edited by Error1000 (2017-03-01 06:37:18)

Offline

#2 2017-02-25 12:17:54

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: [Solved]How to list all packages that have never been opened or used?


Be aware of my Newbie Powers

Offline

#3 2017-02-25 12:23:31

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved]How to list all packages that have never been opened or used?

There is no way to track packages that were never used or opened. But go through the links posted by olegabrielz and you should find ways to clean orphan packages.

Moving to Newbie Corner.

Offline

#4 2017-02-25 12:28:45

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: [Solved]How to list all packages that have never been opened or used?

Error1000 wrote:

Is there any application/command that could list all the packages that were never used/opened?

A package doesn't get "used/opened".  Files within a package can be read from, written to, or executed.  So what is it you are actually asking?  If you want to find all packages for which the last access time of it's most recently accessed file is before a certain date, that could be scriptable if your filesystem tracks access times.  However, most commonly used linux filesystems to do not update access times on reads.

But that would only get you a list of packages that have not been used.  That doesn't mean they can be removed.

Error1000 wrote:

some of them come with other apps

No.  No packages are installed with apps.  Some packages are installed as dependencies of other packages that you've selected to install.  You cannot remove these without removing the packages that you selected to install.

I suspect the real problem is that you've installed some packages, then removed them with only the '-R' flag to pacman leaving behind orphan packages.  It's generally better to use '-Rs' or '-Rsn' to remove packages for this very reason.  The links provided in the post above will provide instructions on how to list all of your explicitly installed packages that are not required by anything else.  Any of these that you don't need you can remove with `pacman -Rsn`.  The links will also tell you how to find orphaned packages left around from previous uses of `pacman -R`.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#5 2017-02-27 06:48:25

Error1000
Member
Registered: 2017-02-25
Posts: 13

Re: [Solved]How to list all packages that have never been opened or used?

Error1000 wrote:

some of them come with other apps

Well actually when i wanted to install xfce on my arch linux i couldn't get it to work until i installed the group xorg which basically contains all the xorg packages and i think that some of them aren't used.
Here is a list of all the packages in the group xorg that i installed :https://www.archlinux.org/groups/i686/xorg/
And i wanted a way to know wich packages from that group aren't used.
And i looked on the archlinux wiki page for xfce and i couldn't find wich packages were needed for xfce so that is why installed the entire group.
And i also think maybe there are other applications wich came in a group that i don't use.
So i don't think it's just xorg that's why i didn't title the forum post "How to get rid of unused packages in the group xorg".
P.S. Please forgive me if i have any mistakes, linux is not my main os so i don't really work that often with it.

Offline

#6 2017-02-27 09:10:12

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: [Solved]How to list all packages that have never been opened or used?

It seems to me that what you've presented actually was a typical XY problem. Now that we actually know what it is you want to accomplish it is much simpler to help. But how did you come up with the idea to install the whole xorg group just to get xfce up and running?

I don't use xfce, just openbox. But I'm pretty sure you can run xfce with just the basics of xorg installed. So xorg-server, xorg-xinit and xf86-input-libinput with their minimum of dependencies pulled in should be sufficient to run xfce.


Be aware of my Newbie Powers

Offline

#7 2017-02-27 11:55:42

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,529
Website

Re: [Solved]How to list all packages that have never been opened or used?

Error1000 wrote:

Well actually when i wanted to install xfce on my arch linux i couldn't get it to work until i installed the group xorg...

That might be what you did but it was certainly not required, nor was it advised.  Follow the wiki.  Note too that the Xorg page is linked from the installation guide.  Xorg is not strictly required - but a display server is (again covered in General Recommendations linked from the installation guide).  You could opt for xorg or wayland.  But even if you chose xorg, you should not install the entire xorg group.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Online

#8 2017-02-28 10:43:45

Error1000
Member
Registered: 2017-02-25
Posts: 13

Re: [Solved]How to list all packages that have never been opened or used?

olegabrielz wrote:

So xorg-server, xorg-xinit and xf86-input-libinput with their minimum of dependencies pulled in should be sufficient to run xfce.

I have tried running it only with org-server, xorg-xinit , xf86-input-libinput and it dose work. I was just wondering if there could be any way i could see wich packages are used (like xorg-xinit , xf86-input-libinput ) from groups(like xorg), so that i could uninstall unused packages without looking through the entire group and figuring out wich ones i need. Other than that thanks for the answers.

Offline

#9 2017-02-28 13:06:26

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [Solved]How to list all packages that have never been opened or used?

Error1000 wrote:

I was just wondering if there could be any way i could see wich packages are used (like xorg-xinit , xf86-input-libinput ) from groups(like xorg), so that i could uninstall unused packages without looking through the entire group and figuring out wich ones i need.

Don't do system upgrade for a week or month and before upgrading find unused packages with 'find' and -atimes.


bing different

Offline

#10 2017-02-28 13:18:23

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: [Solved]How to list all packages that have never been opened or used?

You're welcome

You got your questions answered. Edit your first post and add [Solved] to the beginning of the title.

Enjoy

Edit:
@nbd: Won't that give you some false positives also?

Trilby wrote:

... However, most commonly used linux filesystems to do not update access times on reads.

Last edited by olegabrielz (2017-02-28 13:24:04)


Be aware of my Newbie Powers

Offline

#11 2017-02-28 14:09:58

nbd
Member
Registered: 2014-08-04
Posts: 389

Re: [Solved]How to list all packages that have never been opened or used?

@olegabrielz

ext4 updates atime on reads and enables checking for not accessed files perfectly well. (One need to ensure that mount parameters are appropriate.)


bing different

Offline

#12 2017-02-28 16:01:04

olegabrielz
Member
From: Norway
Registered: 2015-12-23
Posts: 255

Re: [Solved]How to list all packages that have never been opened or used?

@nbd: Thanks for clarification

@Error1000: My advice to avoid unwanted packages is not to install them in the first place.


Be aware of my Newbie Powers

Offline

#13 2017-02-28 16:24:47

seth
Member
Registered: 2012-09-03
Posts: 51,213

Re: [Solved]How to list all packages that have never been opened or used?

- The default is relatime which updates atime if the present atime is older than mtime or 24h

- noatime *will* break atime checks

- strictatime,lazytime will get you exact atimes on low I/O - lazytime also goes nicely w/ relatime but makes the latter nearly superfluous

=> Don't use noatime for regular FS (ie. probably still good for your NAS mounts etc.), use "lazytime" or "strictatime,lazytime" as mount option.

Offline

Board footer

Powered by FluxBB