Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8855949
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T14:15:01+00:00 2026-06-14T14:15:01+00:00

Running Python on a Raspberry Pi, I found that my /tmp folder was becoming

  • 0

Running Python on a Raspberry Pi, I found that my /tmp folder was becoming full over time. On investigation, I found that it was becoming full of files of the form /tmp/python.cache_root/<1>/<2>/, where <1> and <2> are oct digits. These files were created when I ran a scheduled (self-written) Python script.

Googling “Python Caching” and related terms only turned up results from frameworks or products like Maya or Django, which were no good to me. Apologies if I’ve missed an obvious result!

Is this a sign of sloppy coding (e.g. unclosed resources), or simply something that Python does as a by-product of running scripts? Is there an accepted way to deal with this? Running rm -rf /tmp/* “solves” the problem, as does rebooting the Pi, but obviously these aren’t desirable solutions.

EDIT: It’s been suggested that the python-twitter library might be to blame, as per this bug

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T14:15:03+00:00Added an answer on June 14, 2026 at 2:15 pm

    You are probably using the python-twitter project; it creates a temporary directory with the name python.cache_<username>, with that exact structure (based on a md5 hash).

    On Raspberry you are running your code as root usually, so that fits.

    Another python library that uses the exact same structure is python-lastfm; the code was obviously copied between projects. Both projects have sprouted a few forks, so the method may be more widespread still.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This question concerns running python files in terminal that are not stored in the
How do I find the full path of the currently running Python interpreter from
When running a Python program that reads from stdin, I get the following error:
I've been running Python scripts that make several calls to some functions, say F1(x)
I've got a long running python script that I want to be able to
I am running python nosetests on a foreign module. The dots mean that a
I am running Python 2.5. This is my folder tree: ptdraft/ nib.py simulations/ life/
I'm running python 2.6 on windows and currently going over the django tutorial. In
Running Python 2.5 on Windows XP SP2. When I run a Python script that
I'm running Python 2.6.6 on Ubuntu 10.10. I understand that we can import a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.