You are not logged in.

#1 2014-10-12 02:28:24

taro
Member
Registered: 2013-11-08
Posts: 17

[Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Hi, according to the wiki or man page,
$ pacman -Qdt
should list all packages no longer required as dependencies (orphans).
https://wiki.archlinux.org/index.php/pacman

However, in my system for now,
autoconf2.13 doesn't seem to be required but not listed:

$ pacman -Qdt
ffmpeg-compat 1:0.10.15-1
libunrar 1:5.1.7-1
zip 3.0-4

$ sudo pacman -Rs autoconf2.13
checking dependencies...
Packages (1): autoconf2.13-2.13-3
Total Removed Size:   0.60 MiB
:: Do you want to remove these packages? [Y/n]

$ sudo pacman -Qi autoconf2.13
Name           : autoconf2.13
Version        : 2.13-3
...
Required By    : None
...


Is this bug?  Taro

Last edited by taro (2014-10-15 03:05:14)

Offline

#2 2014-10-12 04:16:16

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

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Post the whole output of 'pacman -Qi autoconf2.13'. Was it installed explicitly?

Offline

#3 2014-10-12 04:19:52

taro
Member
Registered: 2013-11-08
Posts: 17

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Thx, @karol.
Yes > Was it installed explicitly?
Here it is > the whole output of 'pacman -Qi autoconf2.13'

% pacman -Qi autoconf2.13                                    [/mnt/tmp/abs]
Name           : autoconf2.13
Version        : 2.13-3
Description    : A GNU tool for automatically configuring source code (Legacy
                 2.1x version)
Architecture   : any
URL            : http://www.gnu.org/software/autoconf/
Licenses       : GPL2
Groups         : None
Provides       : None
Depends On     : perl
Optional Deps  : None
Required By    : None
Optional For   : None
Conflicts With : None
Replaces       : None
Installed Size : 615.00 KiB
Packager       : Felix Yan <felixonmars@gmail.com>
Build Date     : Wed 02 Jul 2014 01:08:53 AM JST
Install Date   : Wed 09 Jul 2014 12:50:40 PM JST
Install Reason : Explicitly installed
Install Script : Yes
Validated By   : Signature

Offline

#4 2014-10-12 04:22:35

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Fo … s_and_Code



Not a Sysadmin issue, moving to NC...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2014-10-12 05:25:09

olive
Member
From: Belgium
Registered: 2008-06-22
Posts: 1,490

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Install Reason : Explicitly installed

You have installed it explicitly. Pacman -Qdt list package installed as dependencies and not required by anything else. You can change the install reason with

pacman -D --asdeps <package>

I use this feature when I want to clean up my system. First I

pacman -D --asdeps <package>

for every package I am no longer interested with, without caring of the fact that another package might require it; then I do

pacman -Rns $(pacman -Qqdt)

This will remove all packages I am not interested with provided they are not required by something I am interested with.

Last edited by olive (2014-10-12 05:26:05)

Offline

#6 2014-10-12 16:07:00

taro
Member
Registered: 2013-11-08
Posts: 17

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

@olive thx! According to your reply, I have also re-checked the man page of pacman,
and found the option:

$ pacman -Qet

is what I want to find out packages explicitly installed but not required.
It's also very useful for me to clean the packages up.
I will add this to the Wiki.  thx!

Offline

#7 2014-10-12 16:49:56

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

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

FWIW, I occasionally check the output of the following which filters the Qet output to remove anything in base or base-devel - so I am left with packages that 1) I've explicitly installed after the system was installed and 2) are not required by anything else.

comm -23 <(pacman -Qqet) <(pacman -Qqg base{,-devel} | sort -u)

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

Online

#8 2014-10-13 04:00:53

taro
Member
Registered: 2013-11-08
Posts: 17

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

@Trilby oh, sweet. I tried but here it produces a small error:

 comm: file 1 is not in sorted order 

in the middle, so how about this?

 comm -23 <(pacman -Qqet | sort -u) <(pacman -Qqg base{,-devel} | sort -u) 

Offline

#9 2014-10-13 11:43:38

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

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

That'd do it - but I'm not sure why you need that first sort.  Pacman -Qqet always seems to print out in sorted order already, though I don't see anything in the man page specifying this behavior.  Out of curiosity, if you just to `pacman -Qqet` do you see what it is that is out of order - or is it not sorted at all?  The only reason I sorted the second component is that pacman would print out the members of base in order, then the members of base-devel in order, so - for example - autoconf would be after zlib.


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

Online

#10 2014-10-15 03:12:41

taro
Member
Registered: 2013-11-08
Posts: 17

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

Yeah, basically the result of pacman -Qqet is sorted, but ordering some characters like "-" or "+" seems different from the sort command, so it's better to put it as well. Anyway thanks for advices guys, I updated the wiki:
https://wiki.archlinux.org/index.php/Pa … _databases
and this topic title to close.

Offline

#11 2014-10-15 03:19:18

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

Re: [Resloved] Bug in pacman -Qdt? How to clean up packages efficiently

I guess including the first sort command would be safest.  But I suspect pacman's output follows locale settings, likely LC_COLLATE.


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

Online

Board footer

Powered by FluxBB