You are not logged in.

#1 2010-11-26 04:26:16

DasFox
Member
Registered: 2010-11-24
Posts: 107

Does Pacman Have A Command To Check For Left Over Dependencies?

Does pacman have a command to check for left over dependencies?

I know that when you remove something it's checking for dependencies and I've seen it show these before, but I swear I removed something that had dependencies and it don't show any and just removed only the single program.

So basically I wanted to know if there are any pacman cmds like this to check the system with and clean it up?


THANKS


P.S. I didn't notice anything like this in the Wiki, only for cleaning out the cache....


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#2 2010-11-26 04:27:36

skunktrader
Member
From: Brisbane, Australia
Registered: 2010-02-14
Posts: 1,676

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

pacman -Qdt

Offline

#3 2010-11-26 05:28:27

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

skunktrader wrote:

pacman -Qdt


Ok I ran it and now I get this;

[root@arch ~]# pacman -Qdt
libasyncns 0.8-2
libxvmc 1.0.6-1
lzo2 2.03-1
rtkit 0.9-1
vlc 1.1.5-1


So now what is this telling me, what do I do next?


THANKS


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#4 2010-11-26 05:33:45

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

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

So now what is this telling me, what do I do next?

Read the pacman wiki entry: https://wiki.archlinux.org/index.php/Pacman and start doing the basic amount of research yourself before posting here...


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2010-11-26 05:53:33

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

jasonwryan wrote:
DasFox wrote:

So now what is this telling me, what do I do next?

Read the pacman wiki entry: https://wiki.archlinux.org/index.php/Pacman and start doing the basic amount of research yourself before posting here...


For starters your reply was rude and I don't appreciate it!

One I was reading the Wiki and I overlooked the information.

Excuse me but I never met a perfect person that you must be that makes ZERO mistakes correct?

Also I'm not your noob or your boy, I'm a middle age man that's been using Linux 10 years, running a Slack box most packages and kernel all custom compiled only running OpenBox...

So next time you want to start telling people to do the basic research before posting, stop and think that maybe they've done it already.

Oh and I just installed Arch ok, setting up everything by reading the Wiki and compiling my own kernel and running Nouveau KMS, with Gnome all customized for the guy that doesn't ever read the WIKI.

So I've RTFM, just be careful with your choice of words and attitude, being the MOD doesn't give you rights to SPIT on people!


And if you were being nice in your odd sort of way I also don't appreciate it, because when we gone out and done the research and overlooked something we have every right to come here and ask and not be told like you've done.

Oh and that WIKI of yours I've seen so many mistakes in the past week on it I don't trust it half the time so I come here to double check too and there's nothing wrong with that!




Now Can I pelase confirm that those packages can be safely removed nothing depends on them?


THANKS

Last edited by DasFox (2010-11-26 05:58:40)


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#6 2010-11-26 06:01:59

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

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

One I was reading the Wiki and I overlooked the information.

I saw no evidence of that: you might have mentioned it in your post...

Also I'm not your noob or your boy, I'm a middle age man that's been using Linux 10 years, running a Slack box most packages and kernel all custom compiled only running OpenBox...

So next time you want to start telling people to do the basic research before posting, stop and think that maybe they've done it already.

Again, there was no evidence of you having done any research: without evidence there is no reason to assume what the observed behaviour contradicts...

So I've RTFM, just be careful with your choice of words and attitude, being the MOD doesn't give you rights to SPIT on people!

Your perception about being insulted is your own - my post contains nothing insulting or offensive, just a very clear answer to your question.

P.S. And if you were being nice in your odd sort of way I also don't appreciate it, because when we gone out and done the research and overlooked something we have every right to come here and ask and not be told like you've done.

You have every right to ask questions; we have every right to insist that you follow the Forum Etiquette when doing so: https://wiki.archlinux.org/index.php/Fo … ow_to_Post


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2010-11-26 06:13:06

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

jasonwryan wrote:
DasFox wrote:

One I was reading the Wiki and I overlooked the information.

I saw no evidence of that: you might have mentioned it in your post...

Also I'm not your noob or your boy, I'm a middle age man that's been using Linux 10 years, running a Slack box most packages and kernel all custom compiled only running OpenBox...

So next time you want to start telling people to do the basic research before posting, stop and think that maybe they've done it already.

Again, there was no evidence of you having done any research: without evidence there is no reason to assume what the observed behaviour contradicts...

So I've RTFM, just be careful with your choice of words and attitude, being the MOD doesn't give you rights to SPIT on people!

Your perception about being insulted is your own - my post contains nothing insulting or offensive, just a very clear answer to your question.

P.S. And if you were being nice in your odd sort of way I also don't appreciate it, because when we gone out and done the research and overlooked something we have every right to come here and ask and not be told like you've done.

You have every right to ask questions; we have every right to insist that you follow the Forum Etiquette when doing so: https://wiki.archlinux.org/index.php/Fo … ow_to_Post


No you didn't reply which you could of simply done, or asked if I read the Wiki which would of been the proper thing, not telling me to RTFM!

I'm like this at times because I've seen it all to often....

Next time before telling someone, ask them, in case they forget to mention it to you...


Anyhow let's move on....


P.S. So I can remove those packages without a problem?

Last edited by DasFox (2010-11-26 06:16:08)


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#8 2010-11-26 06:20:08

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

P.S. So I can remove those packages without a problem?

Well...  only you can know such things.   Look at what the packages do.   They are not needed as dependencies of anything else on your system so if they do not do things that you think you need, remove them.   You need to do the research for your system.

Offline

#9 2010-11-26 06:36:19

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

Allan wrote:
DasFox wrote:

P.S. So I can remove those packages without a problem?

Well...  only you can know such things.   Look at what the packages do.   They are not needed as dependencies of anything else on your system so if they do not do things that you think you need, remove them.   You need to do the research for your system.


Thanks and sorry I was getting huffy I'm sick and not feeling to good so I'm a bit edgy.


I should of known better that Kiwis are pretty mellow, I know I lived in NZ a short while on the N. Shore... smile


THANKS


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#10 2010-11-26 06:39:54

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

You have it all wrong!   He's an Australian and I am the Kiwi...   we just live in each others country!  tongue

Offline

#11 2010-11-26 06:47:58

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

Allan wrote:

You have it all wrong!   He's an Australian and I am the Kiwi...   we just live in each others country!  tongue


A Brisbane Kiwi LOL, now maybe if my name was Fred and I was from Montana and I was a cowboy I might just fall for that...

Oh I know quite a bit about Aussie Land and Kiwi Land. wink


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#12 2010-11-26 07:10:04

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

Oh and that WIKI of yours I've seen so many mistakes in the past week on it I don't trust it half the time so I come here to double check too and there's nothing wrong with that!

As I'm sure you are aware, the Arch wiki is a community-maintained resource, which inevitably means there will be errors from time to time. All members of the community are encouraged to correct and improve the wiki, and I have no doubt that your many years of relevant experience could be applied to that task. It would certainly be a more productive response than that quoted above.

Offline

#13 2010-11-26 07:43:16

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

P.S. So I can remove those packages without a problem?

Check each package with

pacman -Qi <packagename>

I second the call for reading as much of the wiki as possible (for any issue), but in the case of pacman, you'll find full details in the man page.  Speaking as someone who first installed Arch about six weeks ago or so, might I also recommend running

 pacman  <option>h 

and assigning aliases to option combinations.  I have 19 myself for different actions, from installing to checking for orphaned packages to cleaning out the cache. smile

Offline

#14 2010-11-27 11:07:59

silenc3r
Member
From: Poland
Registered: 2009-08-29
Posts: 149

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

to delete all leftover dependencies at once, issue:

pacman -Rsn $(pacman -Qdtq)

Offline

#15 2010-11-28 08:19:16

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

silenc3r wrote:

to delete all leftover dependencies at once, issue:

pacman -Rsn $(pacman -Qdtq)


It worked the first time I ran it, then the next time I ran it I got this back;

[root@arch ~]# pacman -Rsn $(pacman -Qdtq)
error: no targets specified (use -h for help)

Do we always run the cmd like this at a term? ---  pacman -Rsn $(pacman -Qdtq)



THANKS


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#16 2010-11-28 08:27:07

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

Let me break this down for you. The output of pacman -Qdtq is being fed as input to pacman -Rsn. The message you got is likely because pacman -Qdtq produced no output at that time.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

#17 2010-11-28 09:08:35

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

DasFox wrote:

Do we always run the cmd like this at a term? ---  pacman -Rsn $(pacman -Qdtq)

Yes - pacman is a command line application.

Offline

#18 2010-11-28 20:56:10

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

tomk wrote:
DasFox wrote:

Do we always run the cmd like this at a term? ---  pacman -Rsn $(pacman -Qdtq)

Yes - pacman is a command line application.

I know what Pacman is...

I meant if the $(pacman -Qdtq) part was also suppose to be run in it always since the first time I ran it, it came back and showed me a list of dependencies.

Then I cleaned out those dependencies and ran the cmd again, this time it came back telling me, 'error: no targets specified (use -h for help)'. This is why I
asked what I asked, because if it was suppose to be run again like this and works this way then the response it should of given at the CLI, that would be a
more proper response is, 'no dependencies found', not telling us that that there were no targets specified...


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#19 2010-11-28 21:01:50

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

running stuff inside `command` or $(command) just gets the output from the command, since pacman -Qdtq returns nothing, pacman -Rsn isn't given any arguments

do "man pacman" or pacman -Qh

-Q queries installed package, d gets dependencies, t gets packages that aren't used by other packages, q just quiets the output - it isn't specifically designed for finding orphans

Offline

#20 2010-11-28 21:27:24

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

thestinger wrote:

running stuff inside `command` or $(command) just gets the output from the command, since pacman -Qdtq returns nothing, pacman -Rsn isn't given any arguments

do "man pacman" or pacman -Qh

-Q queries installed package, d gets dependencies, t gets packages that aren't used by other packages, q just quiets the output - it isn't specifically designed for finding orphans


What I'm trying to say is, as a cmd if you can run 'pacman -Rsn $(pacman -Qdtq)' to check for any dependencies that aren't needed and remove those, then at a later time you should be able to run the cmd the same way and if there are no dependencies found then it should simply come back saying something to the effect of 'no dependencies found', not saying 'no targets specified'.

For all the years I've used Linux when it comes back saying something wasn't specified, then that cmd wasn't run correct and it needs a change to it, in order to get the result you want, yet it's my understanding this is a proper cmd that does not need any other targets specified...

Is that better now?


THANKS

Last edited by DasFox (2010-11-28 21:29:33)


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#21 2010-11-28 21:44:48

TigTex
Member
From: Portugal
Registered: 2008-06-19
Posts: 301

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

Please think a little.

  pacman -Rsn $(pacman -Qdtq)

-# pacman -Qdtq
-# <no output because there are no leftover depedencies>
-# pacman -Rsn
- no targets specified -> this is obvious, you are telling pacman to remove NOTHING, there are no targets to remove
-#
-#  pacman -Rsn $(pacman -Qdtq)
- no targets specified

and why? because it runs first pacman -Qdtq that gives NO OUTPUT then passes that output to pacman -Rsn.
It's 2 different commands!

You cant just do "pacman -Rsn $(cat something.txt)" and that something.txt is blank. What is this to you? a bug in "cat" command? Or cat needs to say "no depedencies found"?...
I don't get it.

" Does Pacman Have A Command To Check For Left Over Dependencies?" -> Yes it does! It's pacman -Qdt. Done!
" Does Pacman Have A Command To Remove those Left Over Dependencies?" -> No! But you can do pacman -Rsn $(pacman -Qdtq).
Do you want a single command to remove those depedencies? Submit a feature request!

What you want is already implemented in yaourt.
When you run yaourt -Qdt he tells you if you want to remove depedencies found (if they were found...).

ps. a lot of people work with linux or any other OS for more than 10 years and that won't make him "super geeks".

Last edited by TigTex (2010-11-28 21:51:26)


.::. TigTex @ Portugal .::.

Offline

#22 2010-11-29 00:07:18

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

TigTex wrote:

Please think a little.

  pacman -Rsn $(pacman -Qdtq)

-# pacman -Qdtq
-# <no output because there are no leftover depedencies>
-# pacman -Rsn
- no targets specified -> this is obvious, you are telling pacman to remove NOTHING, there are no targets to remove
-#
-#  pacman -Rsn $(pacman -Qdtq)
- no targets specified

and why? because it runs first pacman -Qdtq that gives NO OUTPUT then passes that output to pacman -Rsn.
It's 2 different commands!

You cant just do "pacman -Rsn $(cat something.txt)" and that something.txt is blank. What is this to you? a bug in "cat" command? Or cat needs to say "no depedencies found"?...
I don't get it.

" Does Pacman Have A Command To Check For Left Over Dependencies?" -> Yes it does! It's pacman -Qdt. Done!
" Does Pacman Have A Command To Remove those Left Over Dependencies?" -> No! But you can do pacman -Rsn $(pacman -Qdtq).
Do you want a single command to remove those depedencies? Submit a feature request!

What you want is already implemented in yaourt.
When you run yaourt -Qdt he tells you if you want to remove depedencies found (if they were found...).

ps. a lot of people work with linux or any other OS for more than 10 years and that won't make him "super geeks".



Sorry I don't understand, because I ran 'pacman -Rsn $(pacman -Qdtq)' and it then showed me a list of dependencies and asked me Y/N if I wanted to remove them so I picked Y and hit enter and it removed the dependencies. Now, just to see what it would say if I ran the cmd again, because it was the first time I used it, I ran it again and this time it said 'no targets specified' and this is what I'm getting out.


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

#23 2010-11-29 00:09:55

thestinger
Package Maintainer (PM)
From: Toronto, Canada
Registered: 2010-01-23
Posts: 478

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

$(pacman -Qdtq) is expanded by the shell, not pacman, if there aren't any orphaned packages, it's expanded to nothing, so the command ends up being:

pacman -Rsn

^ no targets specified for removal

If, lets say, mono is an orphan, pacman -Qdtq will output mono, so the command will be expanded to

pacman -Rsn mono

and it will ask you if you want to remove it

you're actually combining two commands, pacman -Rsn and pacman -Qqdt, and the shell is using the output of one for the arguments of the second, just like xargs

it's the same as

pacman -Qqdt | xargs pacman -Rsn

Last edited by thestinger (2010-11-29 00:15:04)

Offline

#24 2010-11-29 00:13:54

anonymous_user
Member
Registered: 2009-08-28
Posts: 3,059

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

If you run "pacman -Qdtq" and there are no matching packages, you will get blank output. So if you try running pacman -Rsn $(pacman -Qdtq) it would be the same as running pacman -Rsn. Hence pacman will tell you "error: no targets specified".

Heres is a visual:

N7EiG.png

Offline

#25 2010-11-29 00:21:56

DasFox
Member
Registered: 2010-11-24
Posts: 107

Re: Does Pacman Have A Command To Check For Left Over Dependencies?

Ok so if there are dependencies, it's going to show you them and ask if you want to remove them but if there aren't any dependencies to show it's just going to spit back "error: no targets specified" and this is all normal?

I just thought it seemed more appropriate to have it spit back at the term saying, 'no dependencies found'.


THANKS


12 Year Linux Vet, Don't Let The Post Count Fool Ya! But Sure I Don't Know Everything, Who Does? That's Why I Ask. smile

Offline

Board footer

Powered by FluxBB