You are not logged in.
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
https://wiki.archlinux.org/index.php/System_maintenance
https://wiki.archlinux.org/index.php/pacman
https://wiki.archlinux.org/index.php/Pa … and_tricks
Be aware of my Newbie Powers
Offline
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
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.
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
Offline
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
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
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
Offline
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
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
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?
... 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
@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
@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
- 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.
Online