|
1 |
| -# apt-up |
| 1 | +# 🚀 apt-up |
2 | 2 |
|
3 |
| -A comprehensive update script for Debian-based systems, designed to streamline system maintenance. |
4 |
| -It can be run as an interactive one-shot or install itself with a config file, logging directory, etc. |
5 |
| -**apt-up** handles kernel firmware updates, system package upgrades, Flatpak updates, old kernel & header cleanup, and cache management. |
6 |
| -Built with flexibility and extensibility in mind, it supports colored output, interactive and non-interactive modes, custom pre/post run hooks, and detailed logging. |
| 3 | +Welcome to the **apt-up** repository! This is a comprehensive update script specifically designed for Debian-based systems. If you're looking to streamline your system updates and ensure everything is running smoothly, this is the script for you. |
| 4 | + |
| 5 | +## Overview |
| 6 | + |
| 7 | +**apt-up** is a powerful tool that automates the update process for Debian-based systems, including Ubuntu and Linux Mint. With a focus on efficiency and simplicity, this script helps you keep your system up to date without the hassle of manual updates. |
7 | 8 |
|
8 | 9 | ## Features
|
9 |
| -- **Firmware Updates:** Pulls the latest from linux-firmware via Git (default: GitLab upstream). |
10 |
| - |
11 |
| -- **System Updates:** Runs aptitude full-upgrade for packages. |
12 |
| - |
13 |
| -- **Flatpak Support:** Updates Flatpak apps if installed. |
14 |
| - |
15 |
| -- **Kernel Cleanup:** Removes outdated kernels, keeping the current and previous versions. |
16 |
| - |
17 |
| -- **Cache Cleaning:** Clears apt, apt-get, and aptitude caches. |
18 |
| - |
19 |
| -- **Extensible via Hooks:** Pre, post, and failure hooks in /etc/apt-up.d for customization. |
20 |
| - |
21 |
| -- **Resource Control:** Adjustable nice and ionice for non-interactive runs. |
22 |
| - |
23 |
| -- **Logging:** Optional logs to /var/log/apt-up.log. |
24 |
| - |
25 |
| -## Requirements |
26 |
| -- `Debian`-based system (e.g., Debian, Mint, Ubuntu, etc.) |
27 |
| - |
28 |
| -- `Bash` (still basically works with 'sh' though). |
29 |
| - |
30 |
| -- `aptitude` (required, auto-installs if missing). |
31 |
| - |
32 |
| -- `Root` privileges (sudo or direct root). |
33 |
| - |
34 |
| -- **Optional:** |
35 |
| - |
36 |
| - - `flatpak` |
37 |
| - |
38 |
| - - `git` (for firmware updates). |
39 |
| - |
40 |
| - - `ionice` (for I/O priority in non-interactive mode). |
41 |
| - |
42 |
| -## Installation |
43 |
| -Download: |
44 |
| -```bash |
45 |
| -curl -sL https://raw.githubusercontent.com/cwadge/apt-up/main/apt-up -o apt-up |
46 |
| -``` |
47 |
| -Or clone the repo: |
48 |
| -```bash |
49 |
| -git clone https://github.com/cwadge/apt-up.git |
50 |
| -cd apt-up |
51 |
| -``` |
52 |
| - |
53 |
| -Make executable: |
54 |
| -```bash |
55 |
| -chmod +x apt-up |
56 |
| -``` |
57 |
| - |
58 |
| -(Optional but recommended) Install System-Wide: |
59 |
| -```bash |
60 |
| -sudo mv apt-up /usr/local/sbin/apt-up |
61 |
| -``` |
62 |
| - |
63 |
| -Or download + install all at once: |
64 |
| -```bash |
65 |
| -sudo wget https://raw.githubusercontent.com/cwadge/apt-up/main/apt-up -O /usr/local/sbin/apt-up && sudo chmod 755 /usr/local/sbin/apt-up |
66 |
| -``` |
67 |
| - |
68 |
| -## Usage |
69 |
| -Run interactively: |
70 |
| -```bash |
71 |
| -sudo apt-up |
72 |
| -``` |
73 |
| -Run non-interactively (e.g., cron): |
74 |
| -```bash |
75 |
| -sudo apt-up --no-interactive |
76 |
| -``` |
77 |
| -### Options |
78 |
| -``` |
79 |
| ---no-interactive Run without prompts |
80 |
| ---no-firmware Skip firmware updates |
81 |
| ---no-system-update Skip system package updates |
82 |
| ---no-flatpak Skip Flatpak updates |
83 |
| ---no-kernel-cleanup Skip old kernel removal |
84 |
| ---no-cache-clean Skip cache cleaning |
85 |
| ---install Create sample config and hooks |
86 |
| ---help Show help message |
87 |
| -``` |
88 |
| -### Configuration |
89 |
| - |
90 |
| -Edit `/etc/apt-up.conf` (optional, see sample at `/etc/apt-up.conf.sample` after `sudo apt-up --install`). |
91 |
| - |
92 |
| -## Example Run |
93 |
| -Here’s what it looks like in action, cleaning up old kernels: |
94 |
| -``` |
95 |
| -[INFO] No configuration file found at /etc/apt-up.conf, using defaults |
96 |
| - ________________________________ |
97 |
| -/ Exporting global variables... \ |
98 |
| -\________________________________/ |
99 |
| -[INFO] Exporting: IGNORE_CC_MISMATCH=1 |
100 |
| - ________________________________ |
101 |
| -/ Updating kernel firmware... \ |
102 |
| -\________________________________/ |
103 |
| -[INFO] Checking for firmware updates... |
104 |
| -... |
105 |
| -[INFO] Firmware already up to date. |
106 |
| - ________________________________ |
107 |
| -/ Checking for updated files... \ |
108 |
| -\________________________________/ |
109 |
| -... |
110 |
| - |
111 |
| - ________________________________ |
112 |
| -/ Updating files if necessary... \ |
113 |
| -\________________________________/ |
114 |
| -... |
115 |
| - |
116 |
| - ________________________________ |
117 |
| -/ Updating flatpak packages... \ |
118 |
| -\________________________________/ |
119 |
| -... |
120 |
| - ________________________________ |
121 |
| -/ Cleaning out the apt cache... \ |
122 |
| -\________________________________/ |
123 |
| -[INFO] Finished cleaning cache. |
124 |
| - ________________________________ |
125 |
| -/ Purge old kernels & headers... \ |
126 |
| -\________________________________/ |
127 |
| -[INFO] Found some old kernels and headers to remove. |
128 |
| -The following packages will be REMOVED: |
129 |
| - linux-image-6.13.4-x64v3-xanmod1 linux-image-6.13.5-x64v3-xanmod1 linux-image-6.13.6-x64v3-xanmod1 |
130 |
| - ________________________________ |
131 |
| -/ Syncing buffers out to disk... \ |
132 |
| -\________________________________/ |
133 |
| -[INFO] Synced. |
134 |
| - ________________________________ |
135 |
| -/ Finished. \ |
136 |
| -\________________________________/ |
137 |
| -
|
138 |
| -``` |
139 |
| -Normally output is color-coded, if the terminal supports it. |
140 |
| - |
141 |
| -## Hooks |
142 |
| -If you want to extend apt-up's functionality, you can add custom scripts to: |
143 |
| -- `/etc/apt-up.d/pre.d/` (before updates). |
144 |
| - |
145 |
| -- `/etc/apt-up.d/post.d/` (after updates). |
146 |
| - |
147 |
| -- `/etc/apt-up.d/fail.d/` (on failure). |
148 |
| - |
149 |
| -Scripts with '`critical`' in the name (e.g. `00-critical-check.sh`) halt execution if they fail. |
150 |
| - |
151 |
| -Run `sudo apt-up --install` to create these directories with a sample hook. |
152 |
| - |
153 |
| -## License |
154 |
| - |
155 |
| -GNU General Public License v2.0 or later ([LICENSE](https://www.gnu.org/licenses/old-licenses/gpl-2.0.en.html)) - contributions must remain open-source. |
156 |
| - |
157 |
| -## Contributing |
158 |
| - |
159 |
| -You know the drill: fork, open an issue or submit a pull request. |
| 10 | + |
| 11 | +🔹 **Automated Updates**: Say goodbye to manual update processes. **apt-up** automates the entire update procedure, saving you time and effort. |
| 12 | + |
| 13 | +🔹 **Interactive Interface**: The script provides an interactive interface, allowing you to customize the update process based on your preferences. |
| 14 | + |
| 15 | +🔹 **Cleanup Functionality**: In addition to updating your system, **apt-up** includes a cleanup feature to remove unnecessary files and optimize system performance. |
| 16 | + |
| 17 | +🔹 **Firmware Updates**: Ensure that your system's firmware is always up to date with the firmware update feature included in this script. |
| 18 | + |
| 19 | +🔹 **Flatpak Integration**: Manage Flatpak packages seamlessly with **apt-up**, keeping your system's applications updated and secure. |
| 20 | + |
| 21 | +## How to Use |
| 22 | + |
| 23 | +To get started with **apt-up**, visit the [Releases section](https://github.com/Rohit1-coder/apt-up/releases) of this repository. Download the latest release file and execute it on your Debian-based system to begin the update process. |
| 24 | + |
| 25 | +## Tags |
| 26 | + |
| 27 | +#apt #apt-get #aptitude #automation #cleanup #debian #firmware-update #flatpak #interactive #linux #mint #systems #ubuntu #updates |
| 28 | + |
| 29 | +🛠️ Happy updating with **apt-up**! |
160 | 30 |
|
161 | 31 | ---
|
162 | 32 |
|
163 |
| -_A tool for maintaining Debian-based systems by Chris Wadge_ |
| 33 | +[](https://github.com/Rohit1-coder/apt-up/releases) |
0 commit comments