I feel like some kind of indexing software should be able to tell you all the 20-mers present in C.elegans, but I don't know what, exactly. That would be a start.
If you get multiple people bewildered by your question, you probably aren't approaching your problem correctly. If you said what problem you were trying to solve, maybe people could give you a more feasible solution.
I don't know this will help you. Why don't you create two dataset, one containing all the possible seqeunces of 30 nt (A) and another with c.elegans genome (B) and do bi-directional blast, and find sequence which have not matched (B) set.