There have been other threads on this. Put simply, buying or selling a share of stock on the secondary market has essentially no effect on a company's ability to keep on doing business as usual. Once those shares have been issued, the company doesn't receive any money from any further trading of that stock.
If you want to do something to hasten the demise of the oil companies, avoiding their stock is not it. If having oil profits flow into your bank account goes contrary to your moral code, then you need to take some action to purchase more expensive funds that avoid those stocks. Just know that your investment choices are not having any effect on the amount of oil extraction that happens.
Something that might be more effective is to seek out some clean energy companies that are currently raising capital directly from investors. Maybe they need funds to build a wind farm or manufacture solar panels or something. This type of investment, where you actually write a check to the company that will be using it, is the way to have your money actually work toward your own goals. Unfortunately, these investment opportunities are often only available to "accredited investors" (aka millionaires or people with incomes over $200k), and are often not widely advertised.