Close Menu
    DevStackTipsDevStackTips
    • Home
    • News & Updates
      1. Tech & Work
      2. View All

      Sunshine And March Vibes (2025 Wallpapers Edition)

      June 2, 2025

      The Case For Minimal WordPress Setups: A Contrarian View On Theme Frameworks

      June 2, 2025

      How To Fix Largest Contentful Paint Issues With Subpart Analysis

      June 2, 2025

      How To Prevent WordPress SQL Injection Attacks

      June 2, 2025

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 2025

      I may have found the ultimate monitor for conferencing and productivity, but it has a few weaknesses

      June 2, 2025
    • Development
      1. Algorithms & Data Structures
      2. Artificial Intelligence
      3. Back-End Development
      4. Databases
      5. Front-End Development
      6. Libraries & Frameworks
      7. Machine Learning
      8. Security
      9. Software Engineering
      10. Tools & IDEs
      11. Web Design
      12. Web Development
      13. Web Security
      14. Programming Languages
        • PHP
        • JavaScript
      Featured

      May report 2025

      June 2, 2025
      Recent

      May report 2025

      June 2, 2025

      Write more reliable JavaScript with optional chaining

      June 2, 2025

      Deploying a Scalable Next.js App on Vercel – A Step-by-Step Guide

      June 2, 2025
    • Operating Systems
      1. Windows
      2. Linux
      3. macOS
      Featured

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025
      Recent

      The Alters: Release date, mechanics, and everything else you need to know

      June 2, 2025

      I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

      June 2, 2025

      This new official Xbox 4TB storage card costs almost as much as the Xbox SeriesXitself

      June 2, 2025
    • Learning Resources
      • Books
      • Cheatsheets
      • Tutorials & Guides
    Home»Operating Systems»Linux»How to Clear APT Cache and Free Up Disk Space

    How to Clear APT Cache and Free Up Disk Space

    January 27, 2025

    The APT cache stores downloaded package files on your system. Over time, this cache can take up significant disk space. How do you clear the apt cache? You simply use this apt clean command option:

    
    apt clean
    
    

    Clearing the APT cache is a simple way to free up space while keeping your system running smoothly.

    Clear Apache Cache: Step by Step Guide

    Step 1: Check Disk Space Usage

    Before clearing the APT cache, check how much disk space is currently used by the cache.

    Open a terminal and execute the following command:

    sudo du -sh /var/cache/apt
    

    This will show the size of the APT cache folder.

    Step 2: Clear the APT Cache

    Now, use the following command to clear the APT cache from your Debian system

    • Clear all cached files: Run this command to remove all files in the cache:
      sudo apt clean
      

      This will delete all downloaded package files, freeing up disk space.

    • Remove unused package files: To remove unnecessary files left by incomplete or failed installations, use:
      sudo apt autoclean
      

      This only removes files that are no longer needed.

    Step 3: Remove Unused Packages

    Sometimes, old or unused packages take up space. To remove them, use:

    Hostinger
    sudo apt autoremove
    

    This will uninstall packages that were automatically installed as dependencies but are no longer needed.

    Step 4: Verify Disk Space

    After clearing the cache and removing unused packages, check your disk space again to confirm:

    sudo du -sh /var/cache/apt
    

    You should see that the size of the cache folder is much smaller.

    Conclusion

    It is safe to clear the APT cache and free up disk space on your Linux system. Use the apt clean and apt autoclean commands regularly to keep your system efficient. If you no longer need unused packages, apt autoremove can help to remove them from your system. These steps ensure your system has more available space and runs smoothly.

    The post How to Clear APT Cache and Free Up Disk Space appeared first on TecAdmin.

    Source: Read More

    Hostinger
    Facebook Twitter Reddit Email Copy Link
    Previous ArticleRandom Forest Algorithm in Machine Learning
    Next Article CodeSOD: Contains Bad Choices

    Related Posts

    News & Updates

    The Alters: Release date, mechanics, and everything else you need to know

    June 2, 2025
    News & Updates

    I’ve fallen hard for Starsand Island, a promising anime-style life sim bringing Ghibli vibes to Xbox and PC later this year

    June 2, 2025
    Leave A Reply Cancel Reply

    Continue Reading

    The Loper Bright Decision: How it Impacts Cybersecurity Law

    Development

    State of User Reasearch 2024

    Development

    FermiNet: Quantum physics and chemistry from first principles

    Artificial Intelligence

    Querying and writing to MySQL and MariaDB from Amazon Aurora and Amazon RDS for PostgreSQL using the mysql_fdw extension, Part 2: Handling foreign objects

    Databases

    Highlights

    How to Use AI in Lightroom: Tips, Tools & Techniques

    August 30, 2024

    Adobe introduced several innovative AI features to the Lightroom app over the past few months,…

    3 ways Google just supercharged your Chrome browser with AI – and they’re surprisingly useful

    August 1, 2024

    One of the best budget Android tablets I’ve tested is not made by Samsung or TCL

    July 30, 2024

    Ofcom Bans Global Titles Leasing to Thwart Criminal Abuse of UK Mobile Networks

    April 22, 2025
    © DevStackTips 2025. All rights reserved.
    • Contact
    • Privacy Policy

    Type above and press Enter to search. Press Esc to cancel.