<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
	<channel>
		<title>Аспро: ЛайтШоп [тема: [РЕШЕНО]/lib/modules занимает весь жёсткий диск]</title>
		<link>http://proxmox.su</link>
		<description>Новое в теме [РЕШЕНО]/lib/modules занимает весь жёсткий диск форума Proxmox Виртуальная Среда на сайте Аспро: ЛайтШоп [proxmox.su]</description>
		<language>ru</language>
		<docs>http://backend.userland.com/rss2</docs>
		<pubDate>Tue, 17 Nov 2026 15:53:51 +0300</pubDate>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325171/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Ой, это ужасно выглядит, @cglmicro. Я никогда не сталкивался с чем-то подобным, я использую этот блок скрипта уже много лет, на разных системах и в разных дистрибутивах Linux. Вывод говорит мне о том, что что-то серьезно не так с выполнением скрипта. Но я понятия не имею, почему это происходит. Вы перенесли содержимое скрипта на свою машину через копирование и вставку? Или через `scp`? Вы как-то изменяли скрипт? Я спрашиваю, потому что предоставленный вами блок скрипта кажется неполным. Отсутствуют строки 153, 159 и 169. Исходный скрипт успешно использовался у меня в течение нескольких месяцев, прежде чем я загрузил его сюда. Все эти строки указывают на то, что что-то не так с конструкциями `if/else`, что мне совершенно непонятно. Кажется, что оболочка интерпретирует эти `if`-конструкции как реальные команды, и эти, конечно, не выполняются. Не могли бы вы предоставить скрипт, который выдал вам ошибки? Перезагрузка, скорее всего, не поможет, так как отсутствуют все записи ядра. <br />
			<i>09.08.2022 16:19:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325171/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325171/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Tue, 09 Aug 2022 16:19:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325170/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Кстати, всем: я сделал значительное обновление скрипта, как объяснено здесь: <noindex><a href="https://forum.proxmox.com/threads/lib-modules-filling-up-hard-drive.39199/post-294457" target="_blank" rel="nofollow" >https://forum.proxmox.com/threads/lib-modules-filling-up-hard-drive.39199/post-294457</a></noindex> <br />
			<i>10.08.2022 21:14:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325170/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325170/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Wed, 10 Aug 2022 21:14:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325169/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Спасибо, Апок, и не переживай из-за повреждений, если удастся предотвратить их для кого-то другого, вот что я и надеялся. Я пытался скопировать с помощью rsync все файлы в обеих папках с другого рабочего PVE, но не знаю, что делать, чтобы вернуть удаленные в apt. А перезагружать еще не пробовал, жду новый сервер, который заказал вчера, чтобы заменить этот. <br />
			<i>09.08.2022 21:28:00, cglmicro.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325169/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325169/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Tue, 09 Aug 2022 21:28:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325168/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Я не думаю, что это проблема с LF/CRLF, скорее какая-то кодировка. Не знаю почему, но [[ интерпретируется как реальная команда, что, конечно, неправильно. К сожалению, я не могу исправить то, что случилось с твоей системой. Но я обновлю скрипт, чтобы логика была другой, чтобы, надеюсь, предотвратить подобные случаи. <br />
			<i>09.08.2022 21:24:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325168/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325168/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Tue, 09 Aug 2022 21:24:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325167/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Привет. Да, я закомментировал некоторые строки, прежде чем вставлять их в этот форум для удобства чтения, полный скрипт смотри ниже. Я открыл твой скрипт в Notepad, закомментировал некоторые строки и скопировал-вставил в ssh на своей машине. Думаешь, ошибка с WINDOWS CRLF может быть причиной?<br /><br />Код:<br />#!/bin/bash<br />################################################<br /># Очистка установки Linux<br /># Автор: Thomas Burger<br /># Версия 1.4<br /># Дата: 2020-10-23<br />################################################<br /><br />counter=0<br /><br />### Очистка<br />clear<br />echo "### ОЧИСТКА УСТАНОВКИ LINUX"<br /><br /><br /># /var/log<br />#myPath="/var/log"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;echo "Очистка &gt;$myPath&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find $myPath`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for file in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="false"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postdot=""<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postdot=$(echo $file | rev | cut -d. -f1 | rev)<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$postdot" == "0" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif [[ "$postdot" == "1" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif [[ "$postdot" == "gz" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /><br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$delete" == "true" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$file&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$file"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># /var/log/journal<br />#myPath="/var/log/journal"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;echo "Очистка &gt;$myPath&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find "$myPath" -mtime +3`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for file in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$file&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$file"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># /var/log.save<br />#myPath="/var/log.save"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;echo "Очистка &gt;$myPath&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find $myPath`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for file in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="false"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postdot=""<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;postdot=$(echo $file | rev | cut -d. -f1 | rev)<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$postdot" == "0" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif [[ "$postdot" == "1" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;elif [[ "$postdot" == "gz" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;delete="true"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /><br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$delete" == "true" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$file&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$file"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># /var/log.save/journal<br />#myPath="/var/log.save/journal"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;echo "Очистка &gt;$myPath&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find "$myPath" -mtime +3`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for file in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$file&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$file"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># /var/cache/e2fsck<br />#myPath="/var/cache/e2fsck"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;echo "Очистка &gt;$myPath&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find "$myPath" -mtime +3`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for file in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$file&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$file"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># /lib/modules AND /boot<br />kernelVersion=`uname -r`<br />myPath="/lib/modules"<br />echo "Очистка &gt;$myPath&lt;"<br />myPathContent=$null<br />myPathContent=`ls -1 "$myPath"`<br />for item in $myPathContent ;<br /> &nbsp; &nbsp;do<br /> &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$item" == "$kernelVersion" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "break the loop"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$myPath/$item&lt;"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -rf "$myPath/$item"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#boot files<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;correspondingBootFiles=`sudo find /boot | grep $item`<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for bootItem in $correspondingBootFiles ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$bootItem&lt;"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$bootItem"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;done<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /> &nbsp; &nbsp; &nbsp; &nbsp;fi<br />done<br /><br /><br />echo "Очистка файлов конфигурации от удаленных пакетов"<br />sudo dpkg -l | awk '/^rc/{print $2}' | sudo xargs apt-get purge -y<br /><br /><br /># update grub<br />echo "Обновление grub"<br />sudo update-grub<br /><br /><br /># Cleanup apt cache<br />echo "Очистка кэша apt-cache через apt-get"<br />sudo apt-get clean -y<br />sudo apt-get autoremove -y<br /><br /><br /># /etc/apt/cache<br />#myPath="/etc/apt/cache"<br />#echo "Очистка &gt;$myPath&lt;"<br />#if [[ -d "$myPath" ]] ;<br /># &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=$null<br /># &nbsp; &nbsp; &nbsp; &nbsp;myPathContent=`sudo find "$myPath/*" &nbsp;-mtime +3`<br /># &nbsp; &nbsp; &nbsp; &nbsp;for item in $myPathContent ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$item&lt;"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$item"<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /># &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /># &nbsp; &nbsp; &nbsp; &nbsp;done<br />#fi<br /><br /><br /># Closing down<br />echo "Очищено $counter элементов."<br />#echo " &nbsp; &nbsp; Current state:"<br />#sudo df -h / Спасибо. <br />
			<i>09.08.2022 19:17:00, cglmicro.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325167/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325167/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Tue, 09 Aug 2022 19:17:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325166/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Привет, Апок. Спасибо за код. Я ни в чем тебя не виню, я знаю, что рисковал. Просто хочу понять, что я сделал не так, и предотвратить то, чтобы кто-то еще допустил такую же ошибку. Я попробовал запустить очищенную версию твоего файла, чтобы позаботиться о ядре в /usr/lib/modules и /boot, а также очистить репозиторий. В итоге в /boot и в /usr/lib/modules не осталось файлов; скрипт удалил все файлы ядра в обеих папках, но не тронул `.`. Это был (почти) пустой тестовый сервер, поэтому я перенесу VM из него, прежде чем попытаюсь перезагрузить его. У меня мало надежд на то, что он загрузится, если только кто-то не знает, как повторно заполнить обе папки. А как насчет файлов apt, которые он удалил? Ты думаешь, мне лучше отформатировать его и перестроить с нуля?<br /><br />Вот код, который я запустил:<br /><br />```bash<br />#!/bin/bash<br />################################################<br /># Cleanup Linux Installation<br /># Author: Thomas Burger<br /># Version 1.4<br /># Date: 2020-10-23<br />################################################<br /><br />counter=0<br /><br />### Cleaning up<br />clear<br />echo "### CLEANING UP LINUX INSTALLATION"<br /><br /># /lib/modules AND /boot<br />kernelVersion=`uname -r`<br />myPath="/lib/modules"<br />echo "Cleaning up &gt;$myPath&lt;"<br />myPathContent=$null<br />myPathContent=`ls -1 "$myPath"`<br />for item in $myPathContent ;<br /> &nbsp; &nbsp;do<br /> &nbsp; &nbsp; &nbsp; &nbsp;if [[ "$item" == "$kernelVersion" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "break the loop"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;break<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;else<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$myPath/$item&lt;"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -rf "$myPath/$item"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /><br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#boot files<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;correspondingBootFiles=`sudo find /boot | grep $item`<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for bootItem in $correspondingBootFiles ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;do<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;#echo "delete &gt;$bootItem&lt;"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if ! [[ -d "$file" ]] ;<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;then<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;sudo rm -f "$bootItem"<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;counter=$(($counter+1))<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;done<br /> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;fi<br /> &nbsp; &nbsp; &nbsp; &nbsp;fi<br />done<br /><br /><br />echo "Cleaning up configuration files from removed packages"<br />sudo dpkg -l | awk '/^rc/{print $2}' | sudo xargs apt-get purge -y<br /><br /><br /># update grub<br />echo "Updating grub"<br />sudo update-grub<br /><br /># Cleanup apt cache<br />echo "Cleaning up apt-cache via apt-get"<br />sudo apt-get clean -y<br />sudo apt-get autoremove -y<br />```<br /><br />Когда я запустил скрипт командой "sh ./clean_linux.sh", я получил ошибки на этих 3 строках:<br /><br />```bash<br />if [[ "$item" == "$kernelVersion" ]] ;<br />if ! [[ -d "$file" ]] ;<br />if ! [[ -d "$file" ]] ;<br />```<br /><br />Вот ошибки, которые я получил:<br /><br />```<br />Cleaning up &gt;/lib/modules&lt;<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 153: [: not found<br />./clean_kernel.sh: 159: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />./clean_kernel.sh: 169: [: not found<br />```<br /><br />Спасибо. <br />
			<i>09.08.2022 15:36:00, cglmicro.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325166/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325166/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Tue, 09 Aug 2022 15:36:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325165/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Просто предупреждаю всех, кто использует этот скрипт. Заметил на системе, работающей продолжительное время, что скрипт не всегда предотвращает заполнение жесткого диска. Ситуация: происходит установка новых ядер, но перезагрузка еще не выполнена, и новые ядра и модули не удаляются. В моем случае было установлено 3-4 новых ядра, что привело к заполнению моего небольшого загрузочного диска (8 ГБ). Перезагрузка и повторный запуск скрипта решили проблему. Просто чтобы вы знали. Всего наилучшего. <br />
			<i>11.07.2022 22:02:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325165/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325165/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Mon, 11 Jul 2022 22:02:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325164/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Я все еще его использую (сейчас на версии 7.1). Используйте на свой страх и риск! Я ни за что не несу ответственности! <br />
			<i>28.02.2022 10:49:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325164/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325164/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Mon, 28 Feb 2022 10:49:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325163/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Спасибо за этот скрипт. Я все еще могу его использовать на своих двух серверах Proxmox? У меня все еще 6.3 и последняя версия 7? <br />
			<i>28.02.2022 10:23:00, rsur2000.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325163/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325163/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Mon, 28 Feb 2022 10:23:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325162/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			@tburger Спасибо за скрипт. <br />
			<i>29.11.2021 22:28:00, neiion.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325162/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325162/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Mon, 29 Nov 2021 22:28:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325161/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Спасибо за этот скрипт, он реально полезен. <br />
			<i>21.07.2021 20:04:00, jamest65.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325161/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325161/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Wed, 21 Jul 2021 20:04:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325160/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Огромное тебе спасибо, ты меня здесь выручил. <br />
			<i>26.02.2021 03:10:00, pbacheti.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325160/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325160/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Fri, 26 Feb 2021 03:10:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325159/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Рад, что помогло @Hakan Evirgen. Спасибо, что сообщил об этом. Всего наилучшего! <br />
			<i>05.09.2020 19:52:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325159/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325159/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Sat, 05 Sep 2020 19:52:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325158/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			@tburger спасибо большое! Очень помогло! <br />
			<i>04.09.2020 12:42:00, Hakan Evirgen.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325158/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325158/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Fri, 04 Sep 2020 12:42:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325157/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			@tburger Спасибо! Это сработало довольно хорошо! У меня узел Proxmox работает с 4G USB-флешки. Ранее на нем была ESXI, и я хотел посмотреть, как все будет, но сразу после установки обновлений диск почти сразу же заполнился. <br />
			<i>14.02.2020 01:07:00, kkjensen.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325157/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325157/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Fri, 14 Feb 2020 01:07:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325156/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Это старая тема, но я подумал, что стоит поделиться, как я, наконец, решил свою проблему. Я запускаю скрипт через cronjob регулярно. Он очищает несколько лог-файлов, а также директории /lib/modules и /boot. Используйте по своему усмотрению и на свой страх и риск! /edit: Обновил скрипт до последней версии (2022-08-10). Изменения: - полностью переработана логика - целью было сделать вещи более надёжными после отчёта от @cglmicro. - Скрипт при запуске без параметров просто отображает, что он собирается сделать (dry-run). - чтобы фактически очистить, используйте параметр -e (e означает execute). - также введены переменные для включения и выключения разделов в самом начале скрипта - это должно помочь и уменьшить необходимость комментировать или удалять строки. Это отлично работает для меня (ubuntu 20.04, PVE 7.2), но, пожалуйста, протестируйте у себя на системе. Я не проверял совместимость с другими языками, локалями и т.д. И ещё раз: Используйте по своему усмотрению и на свой страх и риск! <br />
			<i>12.02.2020 21:59:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325156/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325156/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Wed, 12 Feb 2020 21:59:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
		<item>
			<title>[РЕШЕНО]/lib/modules занимает весь жёсткий диск</title>
			<description><![CDATA[<b><a href="http://proxmox.su/forum/messages/forum63/message325155/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk">[РЕШЕНО]/lib/modules занимает весь жёсткий диск</a></b> <i>Proxmox Виртуальная Среда</i> в форуме <a href="http://proxmox.su/forum/forum63/">Proxmox Виртуальная Среда</a>. <br />
			Привет, команда Proxmox!<br /><br />У меня есть Proxmox PVE сервер, который настроен на автоматическое применение обновлений через cron-задачу + скрипт. Я так делаю, чтобы просто перезагрузить его в какой-то момент. Мой загрузочный диск не особо большой, но при нормальной работе места предостаточно (около 2ГБ), а /var/log находится на отдельном разделе. Теперь я заметил, что /lib/modules заполняет мой /root раздел. Места там вообще не осталось. К счастью, система ведет себя корректно в этой ситуации (вероятно, благодаря достаточному объему RAM). Похоже, содержимое не удаляется автоматически, когда я использую "apt-get clean" и "apt-get autoremove", а также образы в /boot.<br /><br />Я вот думаю, это ожидаемое/желаемое поведение? И если да, то почему был выбран такой подход? Сейчас приходится чистить мой /root диск примерно каждые 2 недели, что не оптимально.<br /><br />Спасибо за помощь!<br /><br />С уважением,<br />Thomas <br />
			<i>12.01.2018 08:51:00, apoc.</i>]]></description>
			<link>http://proxmox.su/forum/messages/forum63/message325155/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</link>
			<guid>http://proxmox.su/forum/messages/forum63/message325155/77830-resheno_lib_modules-zanimaet-ves-zhyestkiy-disk</guid>
			<pubDate>Fri, 12 Jan 2018 08:51:00 +0300</pubDate>
			<category>Proxmox Виртуальная Среда</category>
		</item>
	</channel>
</rss>
