{"id":1745,"date":"2026-02-18T12:21:21","date_gmt":"2026-02-18T15:21:21","guid":{"rendered":"https:\/\/blog.galsoft.com.ar\/?p=1745"},"modified":"2026-04-04T16:39:44","modified_gmt":"2026-04-04T19:39:44","slug":"la-particion-raiz-de-archlinux-se-quedaba-sin-espacio-cada-cierto-tiempo","status":"publish","type":"post","link":"https:\/\/blog.galsoft.com.ar\/?p=1745","title":{"rendered":"La partici\u00f3n raiz (\/) de archlinux se quedaba sin espacio cada cierto tiempo"},"content":{"rendered":"<blockquote>\n<p>Para solucionarlo (con ayuda de los modelos de lenguaje) implement\u00e9 2 timers de systemd que realizan una limpieza de paquetes viejos dejando s\u00f3lo las 2 \u00faltimas versiones (para realizar un downgrade si hace falta) cada 3 dias y una limpieza de paquetes hu\u00e9rfanos cada 2 semanas. Los procesos se disparan a medianoche, y si el equipo no est\u00e1 encendido se disparan luego de 15 minutos del booteo, con un tiempo aleatorio para no sobrecargar el sistema. Aqu\u00ed va el detalle:<\/p>\n<\/blockquote>\n<h3>Documentaci\u00f3n \u2014 Automatizaci\u00f3n de mantenimiento de pacman<\/h3>\n<h5>Objetivo<\/h5>\n<p>Implementar tareas autom\u00e1ticas de mantenimiento del sistema para:<\/p>\n<ol>\n<li>Limpiar cach\u00e9 de paquetes manteniendo solo 2 versiones<\/li>\n<li>Eliminar paquetes hu\u00e9rfanos<\/li>\n<li>Evitar ejecuci\u00f3n simult\u00e1nea entre equipos<\/li>\n<li>Ejecutar tareas pendientes tras reinicios<\/li>\n<li>No interferir con procesos de arranque<\/li>\n<\/ol>\n<hr \/>\n<h3>Componentes creados<\/h3>\n<p>Se definieron <strong>2 servicios<\/strong> y <strong>2 timers de systemd<\/strong>.<\/p>\n<hr \/>\n<h4>1. Limpieza de cach\u00e9 de paquetes<\/h4>\n<h5>Servicio<\/h5>\n<pre><code class=\"lang-bash language-bash bash\">sudo nano \/etc\/systemd\/system\/paccache-clean.service<\/code><\/pre>\n<p>Contenido:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">[Unit]\nDescription=Limpiar cache de pacman (mantener 2 versiones)\n\n[Service]\nType=oneshot\nExecStart=\/usr\/bin\/paccache -rk2<\/code><\/pre>\n<h5>Timer<\/h5>\n<pre><code class=\"lang-bash language-bash bash\">sudo nano \/etc\/systemd\/system\/paccache-clean.timer<\/code><\/pre>\n<p>Contenido:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">[Unit]\nDescription=Timer limpieza cache pacman\n\n[Timer]\nOnBootSec=15min\nOnUnitActiveSec=3d\nRandomizedDelaySec=10min\nPersistent=true\n\n[Install]\nWantedBy=timers.target<\/code><\/pre>\n<blockquote>\n<p>Frecuencia efectiva:\nprimera ejecuci\u00f3n \u2192 15-25 min despu\u00e9s del boot\nrepite \u2192 cada 3 d\u00edas<\/p>\n<\/blockquote>\n<h3>2. Eliminaci\u00f3n de paquetes hu\u00e9rfanos<\/h3>\n<h5>Servicio<\/h5>\n<pre><code class=\"lang-bash language-bash bash\">sudo nano \/etc\/systemd\/system\/pacman-orphans-clean.service<\/code><\/pre>\n<p>Contenido:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">[Unit]\nDescription=Eliminar paquetes hu&eacute;rfanos\n\n[Service]\nType=oneshot\nExecStart=\/bin\/sh -c &#039;\/usr\/bin\/pacman -Qtdq | \/usr\/bin\/pacman -Rns --noconfirm -&#039;<\/code><\/pre>\n<h5>Timer<\/h5>\n<pre><code class=\"lang-bash language-bash bash\">sudo nano \/etc\/systemd\/system\/pacman-orphans-clean.timer<\/code><\/pre>\n<p>Contenido:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">[Unit]\nDescription=Timer limpieza paquetes hu&eacute;rfanos\n\n[Timer]\nOnBootSec=15min\nOnUnitActiveSec=14d\nRandomizedDelaySec=10min\nPersistent=true\n\n[Install]\nWantedBy=timers.target<\/code><\/pre>\n<blockquote>\n<p>Frecuencia efectiva:\nprimera ejecuci\u00f3n \u2192 15-25 min tras arranque\nrepite \u2192 cada 14 d\u00edas<\/p>\n<\/blockquote>\n<h5>Activaci\u00f3n de timers<\/h5>\n<p>Comandos ejecutados:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">sudo systemctl daemon-reload\nsudo systemctl enable --now paccache-clean.timer\nsudo systemctl enable --now pacman-orphans-clean.timer<\/code><\/pre>\n<h5>Verificaci\u00f3n<\/h5>\n<p>Listar timers activos:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">systemctl list-timers<\/code><\/pre>\n<p>Ver configuraci\u00f3n espec\u00edfica:<\/p>\n<pre><code class=\"lang-bash language-bash bash\">systemctl status paccache-clean.timer\nsystemctl status pacman-orphans-clean.timer<\/code><\/pre>\n<blockquote>\n<p>Par\u00e1metros t\u00e9cnicos clave\nPar\u00e1metro   Funci\u00f3n<\/p>\n<ul>\n<li>Persistent=true   Ejecuta tareas pendientes tras apagados<\/li>\n<li>OnBootSec Retrasa ejecuci\u00f3n despu\u00e9s de arrancar<\/li>\n<li>OnUnitActiveSec   Intervalo real entre ejecuciones<\/li>\n<li>RandomizedDelaySec    Evita ejecuciones simult\u00e1neas<\/li>\n<li>Type=oneshot  Ejecuta tarea \u00fanica y finaliza<\/li>\n<\/ul>\n<\/blockquote>\n<h4>Comportamiento final del sistema<\/h4>\n<blockquote>\n<p>El mantenimiento ahora es:<\/p>\n<ul>\n<li>autom\u00e1tico<\/li>\n<li>resiliente a reinicios<\/li>\n<li>distribuido en el tiempo<\/li>\n<li>no intrusivo al arranque<\/li>\n<li>sin intervenci\u00f3n manual<\/li>\n<\/ul>\n<p>Beneficios operativos<\/p>\n<ul>\n<li>evita acumulaci\u00f3n de paquetes<\/li>\n<li>reduce consumo de disco<\/li>\n<li>previene conflictos por dependencias obsoletas<\/li>\n<li>disminuye carga simult\u00e1nea en infraestructura multi-host<\/li>\n<li>mantiene sistema limpio de dependencias innecesarias<\/li>\n<\/ul>\n<p>Posibles mejoras futuras<\/p>\n<ul>\n<li>Opciones recomendables si el entorno crece:<\/li>\n<li>unificar tareas en un \u00fanico timer maestro<\/li>\n<li>registrar logs de espacio liberado<\/li>\n<li>enviar alertas si falla mantenimiento<\/li>\n<li>integrar limpieza de journal logs<\/li>\n<li>pol\u00edtica de mantenimiento centralizada<\/li>\n<\/ul>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Para solucionarlo (con ayuda de los modelos de lenguaje) implement\u00e9 2 timers de systemd que realizan una limpieza de paquetes viejos dejando s\u00f3lo las 2 \u00faltimas versiones (para realizar un downgrade si hace falta) cada 3 dias y una limpieza de paquetes hu\u00e9rfanos cada 2 semanas. Los procesos se disparan a medianoche, y si el [&hellip;]<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"ocean_post_layout":"","ocean_both_sidebars_style":"","ocean_both_sidebars_content_width":0,"ocean_both_sidebars_sidebars_width":0,"ocean_sidebar":"0","ocean_second_sidebar":"0","ocean_disable_margins":"enable","ocean_add_body_class":"","ocean_shortcode_before_top_bar":"","ocean_shortcode_after_top_bar":"","ocean_shortcode_before_header":"","ocean_shortcode_after_header":"","ocean_has_shortcode":"","ocean_shortcode_after_title":"","ocean_shortcode_before_footer_widgets":"","ocean_shortcode_after_footer_widgets":"","ocean_shortcode_before_footer_bottom":"","ocean_shortcode_after_footer_bottom":"","ocean_display_top_bar":"default","ocean_display_header":"default","ocean_header_style":"","ocean_center_header_left_menu":"0","ocean_custom_header_template":"0","ocean_custom_logo":0,"ocean_custom_retina_logo":0,"ocean_custom_logo_max_width":0,"ocean_custom_logo_tablet_max_width":0,"ocean_custom_logo_mobile_max_width":0,"ocean_custom_logo_max_height":0,"ocean_custom_logo_tablet_max_height":0,"ocean_custom_logo_mobile_max_height":0,"ocean_header_custom_menu":"0","ocean_menu_typo_font_family":"0","ocean_menu_typo_font_subset":"","ocean_menu_typo_font_size":0,"ocean_menu_typo_font_size_tablet":0,"ocean_menu_typo_font_size_mobile":0,"ocean_menu_typo_font_size_unit":"px","ocean_menu_typo_font_weight":"","ocean_menu_typo_font_weight_tablet":"","ocean_menu_typo_font_weight_mobile":"","ocean_menu_typo_transform":"","ocean_menu_typo_transform_tablet":"","ocean_menu_typo_transform_mobile":"","ocean_menu_typo_line_height":0,"ocean_menu_typo_line_height_tablet":0,"ocean_menu_typo_line_height_mobile":0,"ocean_menu_typo_line_height_unit":"","ocean_menu_typo_spacing":0,"ocean_menu_typo_spacing_tablet":0,"ocean_menu_typo_spacing_mobile":0,"ocean_menu_typo_spacing_unit":"","ocean_menu_link_color":"","ocean_menu_link_color_hover":"","ocean_menu_link_color_active":"","ocean_menu_link_background":"","ocean_menu_link_hover_background":"","ocean_menu_link_active_background":"","ocean_menu_social_links_bg":"","ocean_menu_social_hover_links_bg":"","ocean_menu_social_links_color":"","ocean_menu_social_hover_links_color":"","ocean_disable_title":"default","ocean_disable_heading":"default","ocean_post_title":"","ocean_post_subheading":"","ocean_post_title_style":"","ocean_post_title_background_color":"","ocean_post_title_background":0,"ocean_post_title_bg_image_position":"","ocean_post_title_bg_image_attachment":"","ocean_post_title_bg_image_repeat":"","ocean_post_title_bg_image_size":"","ocean_post_title_height":0,"ocean_post_title_bg_overlay":0.5,"ocean_post_title_bg_overlay_color":"","ocean_disable_breadcrumbs":"default","ocean_breadcrumbs_color":"","ocean_breadcrumbs_separator_color":"","ocean_breadcrumbs_links_color":"","ocean_breadcrumbs_links_hover_color":"","ocean_display_footer_widgets":"default","ocean_display_footer_bottom":"default","ocean_custom_footer_template":"0","ocean_post_oembed":"","ocean_post_self_hosted_media":"","ocean_post_video_embed":"","ocean_link_format":"","ocean_link_format_target":"self","ocean_quote_format":"","ocean_quote_format_link":"post","ocean_gallery_link_images":"on","ocean_gallery_id":[],"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1745","post","type-post","status-publish","format-standard","hentry","category-linux","entry"],"_links":{"self":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/1745","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1745"}],"version-history":[{"count":6,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/1745\/revisions"}],"predecessor-version":[{"id":1764,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=\/wp\/v2\/posts\/1745\/revisions\/1764"}],"wp:attachment":[{"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1745"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1745"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.galsoft.com.ar\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1745"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}