A vertical line that suddenly appears on an iMac display can occur due to a number of issues unrelated to the physical hardware. Erase a vertical line being displayed on the iMac by following a few procedures that reset the way the computer works. No additional software is needed, nor must you disassemble the iMac in order to erase the vertical line. Using these procedures don't violate the Mac's warranty in any way, nor will you lose any of the data you're storing on the hard drive.
Shut down the iMac if it is on. Press and hold down the following keys on the keyboard: "Command", "Option," "P" and "R." Press the power button once to turn the iMac on. Continue to hold the keys down. Release the keys after a tone sounds for the second time. Wait for the iMac to restart.
Select "Software Update" from the "Apple" drop-down menu at the top left corner of the screen. Wait as a progress bar fills in from left to right on a pop-up window. Click in the check box next to the software update(s) listed on the screen that appears. Click the "Install" button at the bottom of the window. Enter your administration password in the "Password" text field of the pop-up window that appears. Click the "OK" button at the bottom of the pop-up window. Wait as a copy progress bar in a new pop-up window fills in from left to right. Click the "Restart" button at the bottom of a new window that appears. Wait as the iMac installs the software update and then restarts.
Shut down the iMac if it is on. Press and hold down the "Command" + "s" keys. Press the power button once to turn the iMac on. Continue to hold the keys down. Release the keys when white text appears on a black screen. Enter the following text, minus the quotations and period: "fsck -f." Press the "Return" key. Wait for text to appear that says the iMac has been repaired and you can reboot it. Press the "r" key once to reboot the iMac.
A vertical line that refuses to go away could be the result of defective hardware--in which case only an authorised repair station should be looked towards as regards erasing it.