You are not logged in.

#1 2015-04-17 22:18:36

klaus
Member
From: Brazil
Registered: 2013-03-09
Posts: 42

pacexp - python script to list REALLY explicitly installed packages

I usually just lurk the forums-- well, except for when I'm here asking for help with some PEBKAC issues... but never mind that.

This is a small python script I just wrote today while procrastinating. I'd love some feedback on the code, personally, but I'm hoping this could be useful to someone else. I always forget the stuff I have installed when I'm looking to clean my system up and `pacman -Qe` lists a lot of packages that Arch installs itself, so this is my way of dealing with it.

I'll probably be adding some other features to this script anyway, I'm gonna try to keep this post updated whenever I do so.

pacexp
A quick and dirty script to intersect the output of `pacman -Qe` with manually installed packages from /var/log/pacman.log

https://gist.github.com/spaceporn/d4ec6391a4684efb933c

If anyone has any suggestions to improve the code (even a better regexp counts), feel free to write them down here or on the gist page!

Offline

#2 2015-04-17 23:29:36

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: pacexp - python script to list REALLY explicitly installed packages

I use

expac "%n %N" $(comm -23 <(pacman -Qq|sort) <(pacman -Qqg base base-devel|sort)) | awk '$2 == ""' | less;

to list packages that aren't required by any other package and are not part of base or base-devel. All of them have been explicitly installed.

Offline

#3 2015-04-17 23:41:20

klaus
Member
From: Brazil
Registered: 2013-03-09
Posts: 42

Re: pacexp - python script to list REALLY explicitly installed packages

karol wrote:

I use

expac "%n %N" $(comm -23 <(pacman -Qq|sort) <(pacman -Qqg base base-devel|sort)) | awk '$2 == ""' | less;

to list packages that aren't required by any other package and are not part of base or base-devel. All of them have been explicitly installed.

That's pretty cool! I'll probably save it as an alias if I ever have problems with my script smile

Offline

Board footer

Powered by FluxBB