Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How Debian uses apt-get for cleanup

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how Debian uses apt-get to clean up". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

It is common to run apt-get commands on Debian-based systems. Software packages are updated quite frequently, and commands such as apt-get update and apt-get upgrade make this process very easy. On the other hand, how often do you use apt-get clean, apt-get autoclean or apt-get autoremove?

These commands clean up and delete files that are still on the system but are no longer needed after the apt-get installation, usually because the program that needs them has been uninstalled.

Apt-get clean

The apt-get clean command clears the local repository of retrieved package files left in / var/cache. The directories it clears are / var/cache/apt/archives/ and / var/cache/apt/archives/partial/. The only files it leaves in / var/cache/apt/archives are the lock file and the partial subdirectory.

Before running the cleanup operation, the directory may contain many files:

/ var/cache/apt/archives/db5.3-util_5.3.28+dfsg1-0.6ubuntu1_amd64.deb/var/cache/apt/archives/db-util_1%3a5.3.21~exp1ubuntu2_all.deb/var/cache/apt/archives/lock/var/cache/apt/archives/postfix_3.4.5-1ubuntu1_amd64.deb/var/cache/apt/archives/sasl2-bin_2.1.27+dfsg-1build3_amd64.deb

After that, only these will exist:

$sudo ls-lR / var/cache/apt/archives/var/cache/apt/archives:total 4When RWMI r-1 root root 0 Jan 5 2018 lockdrwx- 2 _ apt root 4096 Nov 12 07:24 partial / var/cache/apt/archives/partial:total 0

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report