如何阻止做任何事情

我有一个非常小的嵌入式系统,它上面有一个Linux项目。 当我运行df时,通常使用大约47%的磁盘空间。 但是,每次启动系统时,该数字会变大,直到达到100%。

我可以通过使用apt-get clean来恢复它,但我甚至不想更新任何东西。 我的系统使用的有限容量已经可以正常使用它,我不希望任何升级包更新。

如何禁用每次启动时检查更新和下载内容的function?

我删除了更新管理器,这停止了自动更新。

sudo apt remove update-manager 

此操作已删除

 ubuntu-release-upgrader-gtk update-notifier update-manager 

在我的系统上,我执行以下操作来控制系统:

  1. 我删除了unattended-upgrades

     sudo apt-get purge unattended-upgrades 
  2. 禁用系统定时器,与APT相关:

     sudo systemctl disable apt-daily-upgrade.timer sudo systemctl disable apt-daily.timer 
  3. 禁用'APT::Periodic'肯定:

     echo 'APT::Periodic::Enable "0";' | \ sudo tee /etc/apt/apt.conf.d/99periodic-disable 

通过这些步骤,我可以完全控制APT。 我从未见过锁冲突。

听起来你必须跑步

  sudo apt autoremove 

删除旧内核。

在磁盘使用率达到100%之前执行此操作,请经常执行此操作。

如果禁用更新或删除更新管理器,则必须手动使系统保持最新。 你仍然可以使用apt来达到这个目的。

此外,您应该检查哪些文件/文件夹占用了您的磁盘空间。 如何确定系统中最大的文件/目录存储位置的答案? 可能有用。