I am writing a technical how-to manual on a hardware/software system, and I've written the following phrase:
"To avoid taking up unnecessary storage space on your computer, ..."
Looking back at it, I know it's technically incorrect, since "unnecessary" is describing the storage space, not the act of "taking up."
I know I could say,
"To avoid unnecessarily taking up storage space on your computer,..."
but that carries a slightly different connotation, implying that taking up any storage space (related to the product or not) may be unnecessary. The first version, although definitely wrong, definitely provides the correct idea.