Question

so this is embarrassing but I'm going to ask it.

I accidentally did a pip freeze > requirements.txt command outside of my virtual environment. It has made a requirements.txt file somewhere that I now can not find.

I am making the guess it is not good.

Any ideas

  • where this file was likely made? I'm on OSX 10.8.5 and running 2.7.5
  • how to get rid of it?

Thanks.

Was it helpful?

Solution

Since you're on OS X, you can use the mdfind command – which queries the Spotlight database — to find the file:

$ mdfind -name requirements.txt

In theory it's possible to filter those results by the time they were created, but it's likely simplest to chain that to xargs to get the mtimes:

$ mdfind -0 -name requirements.txt | xargs -0 ls -alht

This will give you a list of all the requirements.txt files on your system, sorted by the time they were last modified.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top