Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Mastodon
  3. Mastodon media cache cleanup is doing nothing?

Mastodon media cache cleanup is doing nothing?

Scheduled Pinned Locked Moved Solved Mastodon
5 Posts 3 Posters 4.7k Views 3 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • whitespaceW Offline
    whitespaceW Offline
    whitespace
    wrote on last edited by
    #1

    I am running Mastodon on my Cloudron.
    Since the media cache tends to use up much space quickly I looked up a way to delete it from time to time.

    Fortunately there is already a cleanup script available in the mastodon terminal.

    /app/pkg/cleanup.sh
    

    Thanks for that.


    I tried the script as well as the pure command which is

    ./bin/tootctl media remove
    

    The outcome is this:

    Removed 0 media attachments (approx. 0 Bytes)
    

    I restarted the application, rechecked. The disk usage remained the same.

    Using the following command I checked, how things look from the tooctl´s perspective in contrast to the Cloudron volumes inspector.

    .bin/tooctl media usage
    

    Result:

    
    Attachments:    3.01 GB (3.54 MB local)
    Custom emoji:   4.98 MB (0 Bytes local)
    Preview cards:  63 MB
    Avatars:        101 MB (116 KB local)
    Headers:        297 MB (195 KB local)
    Backups:        0 Bytes
    Imports:        0 Bytes
    Settings:       204 KB
    

    As you can see the Attachments take up 3.01 GB and I can´t delete them. What is the problem? I do not understand. I suppose it is something specific to the Cloudron installation?

    doodlemania2D jdaviescoatesJ 2 Replies Last reply
    0
    • whitespaceW Offline
      whitespaceW Offline
      whitespace
      wrote on last edited by whitespace
      #5

      Solution:

      ./bin/tootctl media remove
      

      has an option

      --days
      

      which defaults to 7 days of not set.

      Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
      The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.

      I was able to delete the cached media files.

      1 Reply Last reply
      1
      • whitespaceW whitespace

        I am running Mastodon on my Cloudron.
        Since the media cache tends to use up much space quickly I looked up a way to delete it from time to time.

        Fortunately there is already a cleanup script available in the mastodon terminal.

        /app/pkg/cleanup.sh
        

        Thanks for that.


        I tried the script as well as the pure command which is

        ./bin/tootctl media remove
        

        The outcome is this:

        Removed 0 media attachments (approx. 0 Bytes)
        

        I restarted the application, rechecked. The disk usage remained the same.

        Using the following command I checked, how things look from the tooctl´s perspective in contrast to the Cloudron volumes inspector.

        .bin/tooctl media usage
        

        Result:

        
        Attachments:    3.01 GB (3.54 MB local)
        Custom emoji:   4.98 MB (0 Bytes local)
        Preview cards:  63 MB
        Avatars:        101 MB (116 KB local)
        Headers:        297 MB (195 KB local)
        Backups:        0 Bytes
        Imports:        0 Bytes
        Settings:       204 KB
        

        As you can see the Attachments take up 3.01 GB and I can´t delete them. What is the problem? I do not understand. I suppose it is something specific to the Cloudron installation?

        doodlemania2D Offline
        doodlemania2D Offline
        doodlemania2
        App Dev
        wrote on last edited by
        #2

        @whitespace Is there a default aging limit to what it will remove?

        1 Reply Last reply
        0
        • whitespaceW whitespace

          I am running Mastodon on my Cloudron.
          Since the media cache tends to use up much space quickly I looked up a way to delete it from time to time.

          Fortunately there is already a cleanup script available in the mastodon terminal.

          /app/pkg/cleanup.sh
          

          Thanks for that.


          I tried the script as well as the pure command which is

          ./bin/tootctl media remove
          

          The outcome is this:

          Removed 0 media attachments (approx. 0 Bytes)
          

          I restarted the application, rechecked. The disk usage remained the same.

          Using the following command I checked, how things look from the tooctl´s perspective in contrast to the Cloudron volumes inspector.

          .bin/tooctl media usage
          

          Result:

          
          Attachments:    3.01 GB (3.54 MB local)
          Custom emoji:   4.98 MB (0 Bytes local)
          Preview cards:  63 MB
          Avatars:        101 MB (116 KB local)
          Headers:        297 MB (195 KB local)
          Backups:        0 Bytes
          Imports:        0 Bytes
          Settings:       204 KB
          

          As you can see the Attachments take up 3.01 GB and I can´t delete them. What is the problem? I do not understand. I suppose it is something specific to the Cloudron installation?

          jdaviescoatesJ Offline
          jdaviescoatesJ Offline
          jdaviescoates
          wrote on last edited by
          #3

          @whitespace said in Mastodon media cache cleanup is doing nothing?:

          3.01 GB (3.54 MB local)

          I know nothing about this, but perhaps the issue is that only 3.54 MB are local?

          Just a random guess, but I'd guess perhaps you're not actually able to delete attachments posted by non-local accounts? 🤷

          I use Cloudron with Gandi & Hetzner

          whitespaceW 1 Reply Last reply
          0
          • jdaviescoatesJ jdaviescoates

            @whitespace said in Mastodon media cache cleanup is doing nothing?:

            3.01 GB (3.54 MB local)

            I know nothing about this, but perhaps the issue is that only 3.54 MB are local?

            Just a random guess, but I'd guess perhaps you're not actually able to delete attachments posted by non-local accounts? 🤷

            whitespaceW Offline
            whitespaceW Offline
            whitespace
            wrote on last edited by
            #4

            @jdaviescoates I had this thought. I consulted other Mastodon admins. They say, they can delete everything. This should not occur.

            1 Reply Last reply
            1
            • whitespaceW Offline
              whitespaceW Offline
              whitespace
              wrote on last edited by whitespace
              #5

              Solution:

              ./bin/tootctl media remove
              

              has an option

              --days
              

              which defaults to 7 days of not set.

              Our instance is only 3 days old. Since i did not set the flag it defaulted to 7 days.
              The system did everything right. There were no files as old or older than 7 days. Accordingly it did not delete anything. Computer smart.

              I was able to delete the cached media files.

              1 Reply Last reply
              1
              • girishG girish marked this topic as a question on
              • girishG girish has marked this topic as solved on

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Bookmarks
              • Search