I'm looking for other jobs because things have changed since I started my current job. The management is making things worse and my team is not getting any help.

My question is, at my current job, I've written programs at my own free time to automate many tasks that used to take a long time. No one asked me to do this, but I did this out of my free will. I did about 20% of the work while on the clock, but the rest was on nights and weekends in my free time. I was using my own computer, not company resources.

Is it wrong for me to delete those files when I leave? I have not received a raise for creating these programs, even though it benefits the department.

  • 3
    Comments are not for extended discussion; this conversation has been moved to chat. Commented Oct 28, 2016 at 18:59
  • 26
    When I first read the title I thought to myself "of course yes" - then I read the question and found that the software is related to the company and used by people other than you. The answer is then "of course not".
    – Marc.2377
    Commented Oct 28, 2016 at 20:45
  • 5
    Did other people use this software? Do other people know you created this software?
    – user70848
    Commented Oct 29, 2016 at 3:52
  • @user70848 If OP has been hoping for a raise because of this, I think it's likely they have shown how they make things more efficient...
    – hyde
    Commented Oct 29, 2016 at 5:35
  • 3
    Why would you want to delete the software? What would be the downside of turning the software over to your employer? Commented Oct 29, 2016 at 19:20

17 Answers 17


There's zero upside and possible downsides. It sounds more like you would being doing this out of spite, which would not speak well for you.

The 20% you did at work gives your company at least a partial ownership. Your contract may give them more--if any intellectual property you create while on their payroll is theirs, then the copyright on the code is theirs. (All code you write is copyrighted, even if you don't put a copyright notice on it.)

Leave the code. Take the high road, and move on.

  • Comments are not for extended discussion; this conversation has been moved to chat.
    – enderland
    Commented Nov 1, 2016 at 0:34

In addition to the 20% of the script writing you did on the clock, you used your job as the test environment.

If you regard your scripts as your property, not the company's, did you check their policies on the use of outside software? How was the software licensed? Did your manager agree to its use? A license that says, in effect, "You can use these scripts until Matt Damoz leaves." would generally not be acceptable, where one of the standard open source licenses would have been fine.

Your main responsibility during your notice period will be to document your work and hand it over. If you delete scripts you were using, and try to revert during the notice period to an earlier way of doing the jobs, that will be much, much harder to do well. How clearly do you remember, and can you describe, how you used to do things before writing the first script?

The main sufferers if you delete the scripts will be whoever has to do your work. Even if you are on good terms with them now, you won't be after they have struggled with the consequences of the script deletion. They will attribute their difficulties to either malice or incompetence on your part, affecting how they will talk about you, and how they will interact with you if you end up as colleagues in the future.


There has been some discussion in comments on the ownership of the code. That is a legal issue, related to employment and intellectual property law in the jurisdiction of the OP's employment. It appears to me that there would be a serious professionalism issue either in using or in deleting the code in all cases.

The possibilities divide into three major cases:

  1. The OP developed the code for the employer, and it belongs to the employer. Any code written on the OP's own time was donated to the employer.
  2. The code belongs to the OP.
  3. The code is joint property of the OP and the employer, resulting from a collaboration between them.

Case 1, an employee as employee writing scripts to make their work more efficient, is OK so far, but would make deleting the scripts very unprofessional, if not something for which the OP could be sued.

Cases 2 and 3 are more complicated. In each case, the OP as employee is using code that does not belong outright to the employer. It would be very unprofessional for the OP to do so without following procedures for obtaining a license and/or contract with the OP as independent developer. The OP could not properly reach that sort of agreement on behalf of the employer, even if otherwise authorized to do so, because of the conflict of interest involved.

The OP's hands would be clean if the OP did indeed follow corporate procedures for using outside code and avoiding conflicts of interest. However, the employer would probably have required a license that permits continued use of the code after the OP leaves.

  • 3
    I'd say that the company has pretty good cause to take him to court and tan his hide: 1. The scripts were production tested and run on the company's machines; 2. The scripts were explicitly designed to affect the workflow at the company; 3. He did his testing and production runs on the company's dime, and while drawing a paycheck from the company. Commented Oct 29, 2016 at 7:15
  • Conclusion: the OP is acting as a faithless employee and he is needs to be taken to court as such. The company has a pretty good case that the scripts are company property, that the OP engaged in the destruction of company property, and that the company fired him for destruction of company property. Commented Oct 29, 2016 at 7:25
  • 2
    @Magisch It is a messy situation, and the messiness is due to the OP's actions. If the OP wants to treat the code as the OP's property, absolutely zero employer resources should have been used in its development and testing, and it should only have been installed and used on the employer's computers with prior permission and agreement on license terms. Commented Oct 31, 2016 at 9:09
  • 1
    @Magisch I suspect the OP's conflict of interest problems would prevent that. Most employee handbooks prohibit the sort of self-dealing the OP did. Commented Oct 31, 2016 at 9:29
  • 1
    @Magisch - Dream on. Commented Oct 31, 2016 at 9:47

If you're the only person using them, they'll probably be abandoned after you leave and the company won't get any benefit from them.

If you're not the only person using them, then they're part of the company workflow. Deleting them could be considered as much a criminal offence as if you decided to simply steal your company PC on your way out of the building. Various jurisdictions have laws covering "authorized" access to computers.



Even if that doesn't happen, what do you think might happen if your old employer told your new employer what you did? You'd be immediately escorted from the building.

  • 10
    If it's on a company PC, "My" documents isn't your documents but company documents.
    – pjc50
    Commented Oct 28, 2016 at 14:37
  • 3
    So if I put a copy of mp3s that I own in "My Documents", it becomes company documents? I think not. Placing files on a company machine does not automatically make them company property.
    – iheanyi
    Commented Oct 28, 2016 at 16:34
  • 5
    @Brandin My impression is that there is not usually an IT policy against listening to music on the company network using company devices. And there's even less likely to exist a policy that blanketly prohibits deleting documents a worker creates.
    – iheanyi
    Commented Oct 28, 2016 at 16:46
  • 3
    @RichardU I did a google search. Didn't see examples of people being sued for listening to youtube. Found this though: techdirt.com/articles/20080514/1736121116.shtml You may want to consider doing your own search. I'd also suggest reading up on the definition of "copyright infringement".
    – iheanyi
    Commented Oct 28, 2016 at 17:02
  • 6
    Can you ask the "music at work" question separately please? It doesn't really have much to do with the question of deleting scripts.
    – pjc50
    Commented Oct 28, 2016 at 17:52

If other people are aware of those scripts, deleting them as you leave may be seen as sabotage by your colleagues and your boss. The reaction will be similar if they are not aware now but will find out later (e.g. allegedly hand-written reports which look like script-generated).

You may or may not get legal issues as a result, but you'll certainly have problems if your new employer calls your old boss as a part of hiring process. I certainly would avoid hiring someone who decided to break a working process as they leave.


You vastly overestimate the value of undocumented software. This software is useless to the company, because nobody is trained in using it. Deleting the software will not allow you to get back at the company or serve some kind of justice. One could even say that not deleting them is doing the company more harm because they are eating away disk space, which is the only thing they do.

However, deleting the software will increase the likelihood of a bad reference, it will raise doubts about your professionalism, and it will impact your networking efforts. It might even lead to a lawsuit, because with the scripts gone you certainly can't prove that they are worthless.

  • 1
    If nobody uses it or knows it exists but him, how can deleting it lead to a lawsuit? That's like being sued because I took when I left the ergonomic keyboard I bought which helped increase my work output.
    – iheanyi
    Commented Oct 28, 2016 at 16:31
  • 3
    If the disk space is more valuable than the data, then your successor/IT department will eventually delete it. But the critical point is that once you decide to leave, it's their decision what to delete, not yours.
    – Brandin
    Commented Oct 28, 2016 at 16:34
  • @Brandin Huh? Wrong. That is completely my decision until it is no longer my work machine. Part of my job involves writing code. I sometimes write code, try it out, it works great, then delete it because I decided I didn't like it very much. You seem to suggest I could never delete unless there was some disk capacity issue. I install applications, try them out, then delete them. That's my job. I write tools to help automate my personal workflow. Sometimes I keep them, other times, they suck and get deleted. My decision. For a company to sue over this, they'd need a strongly worded contract.
    – iheanyi
    Commented Oct 28, 2016 at 16:38
  • 3
    @iheanyi At no point was it mentioned that nobody knows it exists. Actually, OP stated the opposite in a comment.
    – Peter
    Commented Oct 28, 2016 at 16:38
  • 1
    @iheanyi workplace.stackexchange.com/questions/78614/…
    – Peter
    Commented Oct 28, 2016 at 16:40

Also, if you wrote that code, chances are that no one else realize how important it is nor how to use it nor how to maintain it. They will probably delete it anyway before realizing how important it is. You should never do something that can be compared to "sabotage", even if you did that in your free time. Most companies make you sign that "anything you create related to your work" (so not necessarily during job time) is of their ownership.

In theory, someone even ask you to sign "that know-how" are of their property, so you cannot (in theory) rewrite that same code in another company. Also, you cannot delete something that is not "your property".

From a ethical point of view, there's no need to delete it. I would never doing something that can damage someone and from my point of view deleting useful code (even if it is not used any more by anyone) is a kind of "damage". Instead, before leaving you could instead teach someone that you like in the company how to use that code and why it is that useful.

In the end you can have the chance to get even in better relationship with someone instead of risking disrupting the relationship with your company and eventually risking legal (unlikely, but possible) actions.


When you were writing these programs, did you consider them as "company" programs or "personal" ones? If the answer is "personal" then you had no business working on them at work (the 20% of the time you spent on them).

I am presuming they are really company programs because they were designed "to automate many tasks that used to take a long time". Thus, regardless of how much time you spent at home on them, they are still company programs.

On your own admission the company owns 20% at least of them, because you spent that much time working on them in business hours. Thus they still have claim to that 20%, and it would be ridiculous to delete (say) four out of every five lines of code.

If anyone other than you uses them, that would be an act of sabotage to delete them, and you are likely to find yourself in hot water. Plus, news of what you did ("Matt Damoz deleted stuff from the company computer before he left") would follow you to other jobs. If no-one other than you uses them, deleting them won't have any effect, so it would be safer to do nothing.

No one asked me to do this, but I did this out of my free will.

A lot of employees do things they aren't specifically asked to do. You aren't expected to sit around always following direct orders.

The benefit to you (even if you didn't get a raise) is that your employer would look upon your work with favour. Maybe you were going to get a raise soon, and that extra after-hours work would have been taken into account. Maybe they were looking to sack some staff, but spared you because you did all this extra work. There is a certain karma about working hard and going beyond the call of duty, that will follow you around in future jobs.

There will be negative karma that follows you if you delete programs from your employer's computer out of spite.


If you wrote them while you were on the clock, or using hardware owned by your employer, your employer owns the programs. You don't have the right to delete them.

Besides, why would you do that? Document them and ease your successor's life a little.


Depending on your employment contract they could be your intellectual property. If they are your intellectual property, I believe there is nothing wrong with you removing them.

It might be beneficial, after you have left to inform them that you had been using tools that you wrote yourself, in your own time, to improve your productivity but you have removed them from the system due to them being yours. If you were really nice to them you might offer to sell the scripts to them, if it saved you 1 hour a week, I would ask for between 25 and 50 times 1 hours pay.

Note: This was written before OP said that they used work time to write it, this means that the company has some copyright ownership so the above answer is no longer valid as it was assuming the OP had complete ownership.

  • 1
    Comments are not for extended discussion; this conversation has been moved to chat. Commented Oct 28, 2016 at 19:02
  • 1
    It doesn't depend on the employment contract. The employer/employee relationship causes copyright to automatically be assigned to the employer. Whether the OP used his own time or the company's time to write the scripts is not material here; the scripts only need to be within the context of employment, which they are. See copyright.gov/circs/circ09.pdf Commented Oct 31, 2016 at 1:08

Why delete these programs and not hand them over with a description of how they work etc. just before leaving?

It will make you leave on good terms and help them with the transition. It does not cost you anything.

Also consider that some of your colleagues may show up in the future in other employers that you are working for - either as clients or as colleagues.

Would it be better to have these acquaintances having a good impression of you?

  • 2
    The real question is, why hasn't the Original Poster already documented the tools he's made?
    – Wildcard
    Commented Oct 29, 2016 at 4:09

This is actually very simple. There are the two below scenarios -

Scenario 1 - Your supervisors are aware of your automation code. You can't possibly consider deleting it if this is the case because they'll want to train the new guy on your scripts and you'll be caught. At best, you'll burn a bridge and at worst, you'll be sued.

Scenario 2 - Your supervisors are not aware of your automation code. In this case, you were likely pretending to still be doing the work manually. In effect, you were making it look like the work took far longer than it actually took. If we ignore the ethicality of it, there's no particular consequence whether you delete or not because no one knew that the code existed and the new guy will start doing it manually (and likely automate it himself later).

My recommendation - Don't overestimate your automation code, if it's absolutely essential then your replacements will write it themselves. The ONLY thing that you should be considering when leaving a company is "what if I have to come back?" If there's a way to take credit of your code without hurting your reputation, go ahead and take it. Explain how you worked late nights and weekends etc for it. Make sure everyone higher up knows how hard you worked and how it's going to save company's time (If you can't reveal that you were using this automation code all this time, present it as something you've been building and finished only recently) This will make a good impression, you'll likely get good references for background checks and keep the door open for future.

  • Can the down voter(s) give the reasons for the down votes?
    – Achilles
    Commented Oct 30, 2016 at 18:30
  • Meh. The company owns the code; it's on their computers. Commented Oct 31, 2016 at 1:02
  • Sure, but if no one other than OP is aware of it, an argument can be made that this particular code was being illegally run in production without going through appropriate testing and change management processes. OP should ideally tell them that it exists and take credit for his work.
    – Achilles
    Commented Oct 31, 2016 at 6:08
  • OP's supervisor knows about the scripts. Commented Oct 31, 2016 at 14:51
  • His question doesn't mention that. But if his supervisor is indeed aware then it's scenario 1 and he must not delete anything.
    – Achilles
    Commented Oct 31, 2016 at 15:00

While reading all the answers here a clear bias towards "let them there" shows up, and I would agree on that. Often it also was stated that removing the software wasn't serving any practical purpose and could only be motivated by some kind of kick-back mentality.

I just wanted to point out that this question (delete software or let it stay) might also arise in the case that one does not want the software to become a property of the employer for altruistic reasons. For example, I created a whole bunch of tools which help me doing my everyday work, e. g. copying file trees (over a large amount of time, with precise arrival time prediction, with pause features, with bandwidth reduction for niceness, etc.), base classes for nicer output of arbitrary data, exception stacking, etc.

These I programmed on my personal time, at home, on my computer. But of course they can come in handy at work as well, and since they were small and I knew exactly what they were doing (i. e. no security risk), I also am using them at work. (Let's assume this is okay for my employer while I work there, otherwise we are talking about a different question.)

If I left them at work when I leave the employer, the employer would have good reason to believe this was his property. These are small code snippets and they are typically not officially licensed at all. If I want to avoid any such misunderstanding, deleting them from the employer's hard drive seems like a good idea to me.

Otherwise, If I ever come across the idea of publishing some of this code later, my old employer might find out, misunderstand the situation, and then sue me for publishing his (alleged) proprietary software.

I would not, however, remove software which was still in use at the old company. My personal choice then is to publish the software first (at ActiveState or some similar platform) and then use it in the company.


In the UK that code would be the intellectual property of your employer. That you wrote any of it in your spare time is irrelevant in UK law and the only test is that it was written "in the course of your employment". In this case its fairly clear cut that it was in the course of your employment. The fact that you use them as part of your job and wrote 20% of it in work time would just make it easier to prove in court. I don't know what the possible penalties of deleting company's intellectual property would be but it seems like it should equate to sabotage/vandalism.

If you worked for a company on a self employed contract basis you would retain copyright of the code unless it was specified otherwise in the contract.

  • 1
    This adds nothing new to the already existing answers. Please remember to not repeat others.
    – David K
    Commented Oct 31, 2016 at 12:24

I'm surprised the answer isn't obvious to you.

If your colleagues use these programs then I'm sure they will be really annoyed you deleted them. And probably may inform the management. That may open up possible legal proceedings against you.

The code and programs most likely belongs to your employer. Check your contract!

Many contracts have a section that details intellectual property. Which basically may state that any software developed during the term of your employment and that directly relates with their business belongs to them.

So if I were you, If it's code that benefits no one but them, I would leave the source code with them. Your colleagues will then also think well of you. It's also just common courtesy to do that.

But if it is work that is completely unrelated in every way to this business then you might be able to just do what you like with it.


Carefully examine whatever you signed when you started the job. It's fairly common to have a document saying that anything you develop with company resources OR that relates to your job is their property. In my first non-military job, they actually bought it from me in advance--for one dollar!

The offer to consult on it for a reasonable cost is a good idea though, IF you leave amicably.


Although you voluntarily spent your own time to create these tools and scripts, you did so for the express purpose of aiding with your day job. They are part of that job. Furthermore, you didn't do all of it in your free time.

Why on earth would you delete them? That is sabotage. If you feel you should have been paid for the extra work, the moment to enquire about that was then.

  • 2
    Isn't this reasoning similar to claiming that if you buy a car in order to commute to your job, that car is property of the employer because you bought it to help you keep your job? Commented Oct 30, 2016 at 17:31
  • @RobertColumbia: No. Commented Oct 31, 2016 at 0:09
  • 1
    In what way? Suppose I were to get a M-F job as a janitor and spend weekends at home developing new cleaning products that I hope will make my job easier while I look into starting my own cleaning products company to profit off of those chemicals. Is the fact that those chemicals might have been inspired by a desire to be a top-performing janitor something that makes them employer property? Commented Oct 31, 2016 at 0:18
  • @RobertColumbia: Another irrelevant example falsely presented as analogy. Commented Oct 31, 2016 at 0:38
  • 2
    @RobertColumbia: Keep such code off of company-owned equipment, unless you intend to automatically assign copyright to them. You've been warned. Commented Oct 31, 2016 at 1:00

I disagree with the common answers here. The copyright on the work is own by you. Just because you wrote some of the code while on the clock does not automatically entitle the company to the copyright. But as people have pointed out it will burn the bridge with this company and possibly your current colleagues. If you don't care about that go ahead and delete them. As the copyright owner you have the right to withdraw the licensing of the software.

But here is better suggestion instead of doing that before leave talk to your boss and point out that you own the copyright on the software but would be willing to be bought out. That way if you get paid for the software and you won't break anything when you leave.

  • actually, any work you did on the clock does belong to the company, depending on your contract Commented Oct 30, 2016 at 11:05
  • No i does not, it all depends on local laws but it's never as clear cut as it always belong to the company. And even so 80% was done outside that they clearly have no claim at all on. Commented Oct 30, 2016 at 11:18
  • 1
    @Frozendragon: well, some local laws (such as the German UrhG) are quite clearly saying that it does belong completely to the company unless the work contract specifically contains something else (in which case the OP wouldn't have needed asking...). Commented Oct 30, 2016 at 21:54
  • 1
    Employees create "works of hire." Copyright is automatically assigned to the employer; see copyright.gov/circs/circ09.pdf Commented Oct 31, 2016 at 0:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .