The pairs кто-нибудь and кто-либо, когда-нибудь and когда-либо etc. have slight differences in meaning and each particle is used in specific settings, but I can't quite pinpoint what the difference is.
How can it be explained or described?
Russian Language Stack Exchange is a question and answer site for students, teachers, and linguists wanting to discuss the finer points of the Russian language. It only takes a minute to sign up.
Sign up to join this communityThe pairs кто-нибудь and кто-либо, когда-нибудь and когда-либо etc. have slight differences in meaning and each particle is used in specific settings, but I can't quite pinpoint what the difference is.
How can it be explained or described?
Words with "-нибудь" may have a secondary connotation: "of any quality, no matter how bad", which words with "-либо" would lack:
Артист без критика как-нибудь проживёт, а критик без артиста? [Сати Спивакова. Не всё (2002)]
В старой отцовской, с двумя смежными, разместимся как-нибудь. [Людмила Улицкая. Казус Кукоцкого (2000)]
Как-нибудь (but not как-либо) could also mean at some time (in the future):
― Ты знаешь, это очень длинная история, я тебе её как-нибудь потом расскажу. [С улыбкой // «Даша», 2004]
Где-нибудь (but not где-либо) could also mean approximately, about:
Полагаю, что Россия победит с минимальным преимуществом, где-нибудь 2:1, в крайнем случае ― 3:2. [Дмитрий Навоша. Горячая точка. Перед матчем с Грузией наша сборная поселилась в американском посольстве (2002) // «Известия», 2002.10.11]
The suffix -либо underlines that the choice is from among a limited, known set or interval, while -нибудь usually refers to a choice from an infinite or indefinite set or intervals. So -либо means "no matter who", "no matter where", "no matter when".
The suffix -либо underlines that all outcomes are equal to the speaker, while -нибудь doesn't have that connotation. So -нибудь often implies "barely", "at least", "a thing or person only barely suitable", "an unknown, far removed thing or time", "a thing, person, place or time about which we cannot speculate now".
Compare:
После колледжа я найду какую-нибудь работу.
After college, I'll find [at least] some job.
In this senternce, you can't use какую-либо because the set is undefined and because you mean "at least".
Меня не устраивает какая-либо работа, связанная с программированием.
I don't want any [no matter what] job related to programming.
In this sentence, you can't use какая-нибудь because the set is definite — your attitude is the same vis-a-vis all of them, and you don't mean "at least".
In the following questions, the English translation is ambiguous because "somehow" may mean either "by any actions" or "with any result". In Russian the как-либо/как-нибудь disambiguates.
Существуют ли способы как-либо прожить на пособие?
Are there any ways to somehow survive on social aid ("by some tricks or methods")?
The speaker is asking for methods and advice on how to survive on social aid.
Существуют ли способы как-нибудь прожить на пособие?
Are there any ways to survive on social aid somehow ("good or bad, at least barely")?
The speaker is asking if it's at least possible to survive on social aid, even with a low quality of life.
Если вы планируете как-либо пересечь границу, сразу сообщите о себе в посольство.
If you're planning to somehow ("in this or that way, by the means of your choice, no matter how") cross the border, immediately report to the embassy.
This implies that the speaker expects there are multiple equivalent ways to cross the border.
Если вы планируете как-нибудь пересечь границу, сразу сообщите о себе в посольство.
If you're planning to somehow ("with trouble or without, easily or with some effort, at least barely, even with losses") cross the border, immediately report to the embassy.
This implies that there are possibly no legal or safe ways to cross the border, or that such ways are unknown to the speaker.
I'm answering this question even though it's old because it seems to me that though there are already several interesting answers, none of them is simple and direct.
Words ending in -нибудь refer casually to something unknown to the speaker which someone might want to mention. Words ending with -либо add the nuance of "at all" or "whatsoever" and thus call for strict interpretation.
кто-нибудь — anyone, someone or other
кто-либо — anyone at all
когда-нибудь — ever, someday (usually in the future)
когда-либо — at any time whatsoever (usually in the past)
@FlashCactus says that -либо sounds more official. But this is not a mere matter of style; it's because -либо conveys an idea which officials often need to convey.
For example, at a dinner party you might be asked:
Были ли вы когда-нибудь в России?
Have you ever been to Russia?
Here the question is whether you have ever visited Russia. If you have, then you can have a conversation about it. They're not asking you if you have ever passed through Russia briefly to get somewhere else.
But what if a customs or immigration official asks you:
Совершили ли вы когда-либо неразрешеный въезд на территорию Российской федерации?
Have you at any time entered the Russian Federation without permission?
In this case they're not interested in whether you ever had a chance to experience Russia. They're enforcing formal rules, and as such, want to know about any visit — no matter how trivial you may consider it.
It is hard to formulate the difference in words, but there are contexts, in which "-либо" is a better word choice than "-нибудь", while in other contexts, "-нибудь" is better than "-либо".
Он не сказал, был ли он когда-либо в Америке.
?Он не сказал, был ли он когда-нибудь в Америке.
Ты когда-нибудь был в Америке?
Ты когда-либо был в Америке?
Он спросил, был ли ты когда-нибудь в Америке.
Он спросил, был ли ты когда-либо в Америке.
Если ты когда-нибудь будешь в Америке, приезжай в гости.
???Если ты когда-либо будешь в Америке, приезжай в гости.
?Он поет лучше, чем когда-либо.
*Он поет лучше, чем когда-нибудь.
Он поет лучше, чем когда бы то ни было.
Мне срочно надо сходить на работу, позови кого-нибудь посидеть с ребенком.
*Мне срочно надо сходить на работу, позови кого-либо посидеть с ребенком.
Хотел бы и я когда-нибудь съездить в Америку.
*Хотел бы и я когда-либо съездить в Америку.
For more information on where these contexts come from, have a look at the introductory part of this paper, for example.
The difference between Кто-нибудь and кто-либо is akin to that between somebody and someone.
либо is also generally a bit more formal and is more likely to be used in a formal context than нибудь, which is, in turn, more likely to be used in an informal context.
These days, it's widely considered inappropriate to use когда-нибудь in affirmative sentences when talking about the past, and it also sounds mildly inappropriate to use когда-либо when talking about the future:
Это самый красивый зверь, которого я когда-нибудь видел.
Я не теряю надежды, что когда-либо увижу в лесу лисицу. (using когда-нибудь is better)
I don't really have much new to offer to this discussion, but I was recently studying this topic and came across a section on this in the book Modern Russian Grammar by Dunn and Khairov. Since few sources are cited in this thread, I justify adding an answer on that basis alone, even though the answer itself may not offer much of anything new. Without further ado, allow me to cite some information from this source:
From Section 7.6.4, "The -либо series":
Many dictionaries describe the -либо series as being synonymous with the -нибудь series, and they are indeed similar in meaning. Nevertheless, there are some contexts where the -либо series does seem to be preferred.
Pronouns from the -либо series can be used to translate 'any' in a negative construction:
Я не могу́ предста́вить, что́бы кто́-либо суме́л его́ обыгра́ть.
I can't imagine that there's anyone capable of beating him.
Notice that the book just states that -либо can be used for this and somewhat hints that it may be preferred if you refer to the preceding paragraph. I must admit that any preference in this regard is somewhat difficult to prove, but when I tested the following phrase
не думаю что кто-нибудь / кто-либо
after only about five minutes and trying a few different search parameters, I did manage to see this reflected. Results from this cursory effort in the chart below:
Trust me, if you're not careful with your search parameters, you might easily get the opposite impression on this point.
Pronouns from the -либо series are also used in comparisons after чем:
Он зна́ет об э́том бо́льше, чем кто́-либо друго́й.
He knows more about that than anyone else.
This point was far easier to prove. The Google n-gram clearly shows which variant is more frequent:
In some contexts pronouns from the -нибудь and the -либо series are indeed interchangeable. The latter tend to be more characteristic of formal language, but if there is a difference in meaning, it is that the -либо pronouns emphasise that it really does not matter who or what is involved:
А бы́ли в ва́шей библиоте́ке каки́е-либо/каки́е-нибудь кни́ги по иску́сству?
Did your library have any books on art?
If in doubt on which to use, I'd opt for a form with -нибудь, simply for this reason alone:
The -нибудь variant is far more frequent.