Avodah Zarah 3:10
Avodah Zarah3: 10
כֵּיצַד מְבַטְּלָהּ? קִרְסֵם, וְזֵרֵד, נָטַל מִמֶּנָּה מַקֵּל אוֹ שַׁרְבִיט, אֲפִלּוּ עָלֶה — הֲרֵי זוֹ בְטֵלָה. שְׁפָיָהּ לְצָרְכָּהּ — אֲסוּרָה; שֶׁלֹּא לְצָרְכָּהּ — מֻתֶּרֶת.
How does he nullify it? [If] he pruned [it], or trimmed [it], [or] he took a stick from it or a twig —- even a leaf, it is nullified. [If] he shaved chips from it for its own needs, it remains prohibited; not for its own needs, it becomes permitted.