Skip to content

[Feature] Automatically remove the update package in the /opt/1panel/tmp/upgrade directory #7361

@Cusanity

Description

@Cusanity

1Panel Version

v1.10.22-beta.2

Please describe your needs or suggestions for improvements

升级的时候会将安装包储存在/opt/1panel/tmp/upgrade目录下 而且重启系统或者更新成功后也不会自动删除
在群晖NAS上这个问题比较严重因为/dev/md0只分配了2.3G 大概更新四五次后就需要手动删除
当然可以用Task Scheduler或者crontab之类的方式自动删除 但是这毕竟浪费了用户调查的时间 也想不出要留着所有旧版本安装包文件的理由

:/opt/1panel/tmp/upgrade$ ll
total 56
drwxr-xr-x 14 root root 4096 Dec 13 14:05 ./
drwxr-xr-x 4 root root 4096 Nov 10 22:01 ../
drwxr-xr-x 4 root root 4096 Jun 24 16:29 upgrade_20240624162953/
drwxr-xr-x 4 root root 4096 Jun 27 13:27 upgrade_20240627132718/
drwxr-xr-x 4 root root 4096 Jul 30 11:02 upgrade_20240730110213/
drwxr-xr-x 4 root root 4096 Aug 29 10:04 upgrade_20240829100448/
drwxr-xr-x 4 root root 4096 Sep 14 10:17 upgrade_20240914101704/
drwxr-xr-x 4 root root 4096 Sep 24 09:30 upgrade_20240924093028/
drwxr-xr-x 4 root root 4096 Oct 15 12:08 upgrade_20241015120801/
drwxr-xr-x 4 root root 4096 Oct 29 10:51 upgrade_20241029105129/
drwxr-xr-x 4 root root 4096 Nov 15 15:02 upgrade_20241115150254/
drwxr-xr-x 4 root root 4096 Nov 19 10:45 upgrade_20241119104516/
drwxr-xr-x 4 root root 4096 Nov 20 13:04 upgrade_20241120130453/
drwxr-xr-x 4 root root 4096 Dec 13 14:05 upgrade_20241213140525/

Please describe the solution you suggest

更新成功后自动删除/opt/1panel/tmp/upgrade下的安装包

Additional Information

No response

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions