var/cache/apt/archives occupying huge space

I am in the process of cleaning up my system. And I see a lot of space occupied by this folder /var/cache/apt/archives (1.5GB). Is it absolutely necessary to keep all these archives?

You don't need to keep them around if you don't want them. Executing a

sudo apt-get clean

will clean out the directory.

-----------------------------------------------------------------------------------------------------------------------------

删除nginx,–purge包括配置文件

sudo apt-get --purge remove nginx
  • 1

自动移除全部不使用的软件包

sudo apt-get autoremove

列出与nginx相关的软件 并删除显示的软件

dpkg --get-selections|grep nginx

sudo apt-get --purge remove nginx
sudo apt-get --purge remove nginx-common
sudo apt-get --purge remove nginx-core

再次执行

dpkg --get-selections|grep nginx

which nginx # 不在显示nginx

这样就可以完全卸载掉nginx包括配置文件 
注意点:首先需要停止nginx的服务

sudo service nginx stop
----------------------------------------------------------------------------------------------------------------------------

What is the best way to uninstall nginx

sudo apt-get remove nginx nginx-common # Removes all but config files.

sudo apt-get purge nginx nginx-common # Removes everything.

sudo apt-get autoremove # After using any of the above commands, use this in order to remove dependencies used by nginx which are no longer required.

answered Jan 2 '13 at 20:25
stedotmartin

6,23112228
 
 

ubuntu 卸载干净软件(包括配置文件)的更多相关文章

  1. ubuntu 卸载软件

    ubuntu完全卸载一个软件   今天卸载一个软件,老是有配置残留,网上找到了解决方案: 查看已安装的软件: dpkg -l |grep 软件名 找到一大堆相关的包,然后卸载核心的包: sudo ap ...

  2. ubuntu完全卸载一个软件

    今天卸载一个软件,老是有配置残留,网上找到了解决方案: 查看已安装的软件: dpkg -l |grep 软件名 找到一大堆相关的包,然后卸载核心的包: sudo apt-get remove --pu ...

  3. 安装AD15有问题多数是因为旧版本AD软件没有卸载干净,清理方法详解

    论坛中总会看到有些朋友安装AD14.x,AD15.x后,使用不正常,多数情况是因为旧版本的AD软件没有卸载干净,安装新版本AD软件后,就会有问题.卸载和清理AD旧版本软件的方法如下(此方法只能解决卸载 ...

  4. Ubuntu下安装软件、卸载

    Ubuntu下安装软件.卸载 一般的安装程序有三种: .deb和.rpm这2中安装文件 .boudle这是二进制安装文件 .tar.gz文件是压缩包,与.rar和.zip压缩包一样,安装此类文件需要先 ...

  5. Ubuntu卸载软件

    在终端中输入 sudo dpkg --list 查看已安装的软件,得知需要卸载的软件名为<programme> 再输入 sudo apt-get --purge remove <pr ...

  6. Ubuntu下安装软件

    在ubuntu当中,安装应用程序有三种方法,分别是:apt-get,dpkg安装deb和make install安装源码包三种. apt-get方法 使用apt-get install来安装应用程序算 ...

  7. ubuntu一些基本软件安装方法

    ubuntu一些基本软件安装方法 首先说明一下 ubuntu 的软件安装大概有几种方式:1. deb 包的安装方式deb 是 debian 系 Linux 的包管理方式, ubuntu 是属于 deb ...

  8. ubuntu 卸载/安装 redis

    ubuntu 卸载redis 1. 卸载软件 apt-get remove redis 2. 清除配置 apt-get remove --purge redis 3. 删除残留文件 find / -n ...

  9. ubuntu 彻底删除软件

    无法获取 dpkg 前端锁 解决办法如下:1.终端输入 ps  aux ,列出进程.找到含有apt-get的进程,直接sudo kill PID. 2.强制解锁,命令sudo rm /var/cach ...

随机推荐

  1. Apache简易快速安装

    转发出处:https://blog.csdn.net/qq_34804120/article/details/78862290 准备安装包 到https://www.apachelounge.com/ ...

  2. sql server 学习分享

    http://www.cnblogs.com/liu-chao-feng/p/6144872.html

  3. [linux time命令学习篇] time 统计命令执行的时间

    注意: 命令后面一定要有分号; http://codingstandards.iteye.com/blog/798788 用途说明 time命令常用于测量一个命令的运行时间,注意不是用来显示和修改系统 ...

  4. [uiautomator篇][9]遇到问题

    1 (1) 修改apk的存储权限,不要创建文件会提示:文件找不到 (2) 退出应用 mDevice.executeShellCommand("am force-stop com.antutu ...

  5. TOJ4537: n阶行列式

    4537: n阶行列式  Time Limit(Common/Java):1000MS/3000MS     Memory Limit:65536KByteTotal Submit: 28       ...

  6. 【Kubernetes】The connection to the server <master>:6443 was refused - did you specify the right host or port?

    不知道怎么用着用着,使用kubectl 时报错,错误如下: root@R740--:~# kubectl get pod The connection to the server 107.105.13 ...

  7. Problem 1004: 蛤玮打扫教室(区间覆盖端点记录)

    Problem 1004: 蛤玮打扫教室 Time Limits:  1000 MS   Memory Limits:  65536 KB 64-bit interger IO format:  %l ...

  8. Java面试题之有没有有顺序的Map实现类,如果有,他们是怎么实现有序的?

    Hashmap和Hashtable 都不是有序的. TreeMap和LinkedHashmap都是有序的.(TreeMap默认是key升序,LinkedHashmap默认是数据插入顺序) TreeMa ...

  9. hdu 4372 Count the Buildings 轮换斯特林数

    题目大意 n栋楼有n个不同的高度 现在限制从前面看有F个点,后面看有B个点 分析 最高那栋楼哪都可以看到 剩下的可以最高那栋楼前面分出F-1个组 后面分出B-1个组 每个组的权值定义为组内最高楼的高度 ...

  10. hdu 4418 高斯消元求期望

    Time travel Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total ...