All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
First of all, it should be mentioned that endeavoring to prevent the so-called pornographic sites is obligatory according to one’s ability because this is within the framework of denying evil [which is an obligation]. Abu Sa'eed Al-Khudri said: “I heard the Prophet saying: "Whoever amongst you sees an evil, he should change it with his hand (i.e. physically), if he is unable, then he should change it with his tongue (i.e. verbally) and if he is unable, then he should change it with his heart (by detesting it in his heart) and that is the weakest level of faith." [Muslim]
However, this work involves obvious risks as a person may be subjected to temptation by viewing such pictures during his work. In such cases, there are some rules to be applied, among which is what Shaykh Al-Islam Ibn Taymiyyah said: “It is an obligation to achieve benefits and complete them, and to repel harms and reduce them, but if they contradict (two benefits or two harms), then achieving the greatest of the two benefits at the expense of the least of the two and repelling the greatest of the two harms by bearing the least of the two is what is legitimate (permissible).”
Al-'Izz ibn Abdus-Salaam said: “If benefits and harms coincide, then if it is possible to achieve the benefits and repel the harms, we should do that, and if it is not possible to repel the harm and achieve the benefit, then if the harm is greater than the benefit, then we should repel the harm and not care about missing the benefit,………. but if the benefit is greater than the harm, then we should achieve the benefit while bearing the harm; and if the benefits and harms are equal, then one may choose between them or stop choosing among them, and there might be a difference of opinion in regard to the difference of the degree of harms.”
Therefore, if you are secure from temptation and you are able to lower your gaze as much as possible, and take precautions that prevent you from being tempted by those pictures, then it is permissible for you, Allaah willing, to work on deleting them and continue to work in this company, provided that working in it is permissible in principle (i.e. the basic activity of the company is lawful).
Allaah Knows best.