mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
Improve basic-space-cleanup shell calls and documentation
This commit is contained in:
parent
b920b82f4e
commit
8ca59703c5
1 changed files with 5 additions and 23 deletions
28
src/tools.py
28
src/tools.py
|
@ -628,31 +628,13 @@ def tools_basic_space_cleanup():
|
||||||
Basic space cleanup.
|
Basic space cleanup.
|
||||||
|
|
||||||
apt autoremove
|
apt autoremove
|
||||||
apt clean
|
apt autoclean
|
||||||
archived logs removal
|
|
||||||
journalctl vacuum (leaves 50M of logs)
|
journalctl vacuum (leaves 50M of logs)
|
||||||
|
archived logs removal
|
||||||
"""
|
"""
|
||||||
subprocess.run(
|
subprocess.run("apt autoremove && apt autoclean", shell=True)
|
||||||
[
|
subprocess.run("journalctl --vacuum-size=50M", shell=True)
|
||||||
"/bin/bash",
|
subprocess.run("rm /var/log/*.gz && rm /var/log/*/*.gz && rm /var/log/*.? && rm /var/log/*/*.?", shell=True)
|
||||||
"-c",
|
|
||||||
"apt autoremove && apt autoclean",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
subprocess.run(
|
|
||||||
[
|
|
||||||
"/bin/bash",
|
|
||||||
"-c",
|
|
||||||
"journalctl --vacuum-size=50M",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
subprocess.run(
|
|
||||||
[
|
|
||||||
"/bin/bash",
|
|
||||||
"-c",
|
|
||||||
"rm /var/log/*.gz && rm /var/log/*/*.gz && rm /var/log/*.? && rm /var/log/*/*.?",
|
|
||||||
]
|
|
||||||
)
|
|
||||||
|
|
||||||
# ############################################ #
|
# ############################################ #
|
||||||
# #
|
# #
|
||||||
|
|
Loading…
Add table
Reference in a new issue