1. 删除多余 apt 包

    这些就是依赖的所有动态链接库,接着我们将这些包用 apt-mark 声明为“手工安装的包”,即可阻止 apt purge 的自动卸载。
    然后,我们再自动卸载其余没有用到的包即可。完整shell脚本如下:
    find /usr/local -type f -executable -exec ldd '{}' ';' \
    | awk '/=>/ { print $(NF-1) }' \
    | sort -u \
    | xargs -r dpkg-query --search \
    | cut -d: -f1 \
    | sort -u \
    | xargs -r apt-mark manual \
    ; \
    apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false;
    
    

    https://www.mianshigee.com/note/detail/20422lhk/

  2. 删除容器内 python2
    apt-get remove --auto-remove python2.7
    apt-get purge --auto-remove python2.7
    apt-get autoclea python2.7 whereis python2 # 查看是否存在python2
    whereis python2 |xargs rm -frv # 删除python2所有残余文件

    https://zhuanlan.zhihu.com/p/526332103

最新文章

  1. CSharpGL(8)使用3D纹理渲染体数据 (Volume Rendering) 初探
  2. Spring MVC如何配置OpenSessionInViewInterceptor并结合Hibernate使用
  3. 安装percona-xtrabackup一直提示依赖冲突的一个解决办法
  4. CI(CodeIgniter)框架介绍
  5. ZOJ3471--Most Powerful(状压DP)
  6. C#垃圾回收机制详解
  7. ie中弹出框中元素的定位
  8. JavaSE复习日记 : 方法的调用和方法的重载
  9. GDB学习之道:GDB调试精粹及使用实例
  10. Android4.0设置接口变更摘要(四)
  11. CenOS http 安装与运行
  12. Mysql创建、删除用户、用户管理等相关:转载http://www.cnblogs.com/fly1988happy/archive/2011/12/15/2288554.html
  13. wordpress主题
  14. 距离不是一个连续的物理量(Distance is not a continuous physical quantity)
  15. 添加用户到sudoers
  16. Confluence 6 数据库整合的方法 1:基本流程
  17. 建筑的永恒之道 (C·亚历山大 著)
  18. (一)apache atlas源代码编译与打包
  19. LintCode: Longest Words
  20. git 常用命令总结(一)

热门文章

  1. vant组件,picker时间选择,自定义时间选择,实现datePacker,时间选择长期,增加长期选项,用于选择身份证到期时间等...
  2. JZOJ 4417. 【HNOI2016模拟4.1】神奇的字符串
  3. Shell命令-基础
  4. ES6中的class对象和它的家人们
  5. Prometheus插件安装(NodeExporter)
  6. springmvc关于通过使用路径占位符出现中文乱码解决办法
  7. 在docker中,运行Jcmd命令,报错
  8. HttpClient Post 提交表单数据
  9. PTA---求月天数
  10. vue 状态类展示使用红绿圆点