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 "-нибудь" might have a secondary connotation: "of any quality, no matter how bad", which words with "-либо" would lack:
Артист без критика как-нибудь проживёт, а критик без артиста? [Сати Спивакова. Не всё (2002)]
В старой отцовской, с двумя смежными, разместимся как-нибудь. [Людмила Улицкая. Казус Кукоцкого (2000)]
Как-нибудь (but not как-либо) could also mean some time (in the future):
― Ты знаешь, это очень длинная история, я тебе её как-нибудь потом расскажу. [С улыбкой // «Даша», 2004]
Где-нибудь (but not где-либо) could also mean approximately, about:
Полагаю, что Россия победит с минимальным преимуществом, где-нибудь 2:1, в крайнем случае ― 3:2. [Дмитрий Навоша. Горячая точка. Перед матчем с Грузией наша сборная поселилась в американском посольстве (2002) // «Известия», 2002.10.11]
The -либо underlines that the choice happens from a limited, known set or interval, while -нибудь usually means a choice from an infinite or indefinite set or interval. So the -либо means "no matter who", "no matter where", "no matter when".
The -либо underlines that all outcomes are equal to the speaker while -нибудь does not have such connotation. So -нибудь often means "barely", "at least", "a thing or person only barely suitable", "an unknown, far removed thing or time", "the thing, person, place or time about which we cannot speculate now".
Compare:
После колледжа я найду какую-нибудь работу.
After the college I will find [at least] some job.
In this senternce you cannot use какую-либо because the set is undefined and because you mean "at least".
Меня не устраивает какая-либо работа, связанная с программированием.
I don't want any [no matter what] job connected to programming.
In this sentence you cannot use какая-нибудь because the set is definite, your attitude is equal to all and you do not 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 survive on social aid somehow ("by some tricks or methods")?
The speaker asks for methods and advices 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 asks if it is at least possible to survive on social aid, even with low quality of life.
Если вы планируете как-либо пересечь границу, сразу сообщите о себе в посольство.
If you are planning to somehow ("this or that way, by the way 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 are planning to somehow ("with troubles or not, easily or with 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 such ways are unknown to the speaker.
It is hard to formulate the difference in words.
But there are contexts when "-либо" is better than "-нибудь", in other contexts "-нибудь" is better than "-либо"
Indirect negation: "-либо" is better than "-нибудь"
Он не сказал, был ли он когда-либо в Америке.
?Он не сказал, был ли он когда-нибудь в Америке.
Question: both variants are possible, some speakers prefer "-нибудь", others prefer "-либо"
Ты когда-нибудь был в Америке?
Ты когда-либо был в Америке?
Indirect question: both are equally good
Он спросил, был ли ты когда-нибудь в Америке.
Он спросил, был ли ты когда-либо в Америке.
Conditional: "-нибудь" is better than "-либо"
Если ты когда-нибудь будешь в Америке, приезжай в гости.
???Если ты когда-либо будешь в Америке, приезжай в гости.
Comparative: "-либо" is better than "-нибудь" (but the correct variant, imho, is "бы то ни было").
?Он поет лучше, чем когда-либо.
*Он поет лучше, чем когда-нибудь.
Он поет лучше, чем когда бы то ни было.
"Irrealis non-specific", the context when the entity does not exist (yet) or is hypothetical:
Imperative
Мне срочно надо сходить на работу, позови кого-нибудь посидеть с ребенком.
*Мне срочно надо сходить на работу, позови кого-либо посидеть с ребенком.
Wish
Хотел бы и я когда-нибудь съездить в Америку.
*Хотел бы и я когда-либо съездить в Америку.
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.
It is usually inappropriate nowadays to use когда-нибудь in affirmative sentences when talking about the past, and also seems mildly inappropriate to use когда-либо when talking about the future:
Это самый красивый зверь, которого я когда-нибудь видел.
Я не теряю надежды, что когда-либо увижу в лесу лисицу. (using когда-нибудь is better)
I am answering this question even though it is 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 we might choose to mention. Words ending with -либо add the thought of "at all" or "whatsoever" and so 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 is 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 Russian?
If you have made any significant visits to Russian, this information may be helpful. But a customs or immigration official might ask:
Совершили ли вы когда-либо неразрешеный въезд на территорию Российской федерации?
Have you at any time entered the Russian Federation without permission?
The official is enforcing strict rules. He needs to know about all visits, even those you do not consider important.