- Major code optimization
- Better code format
- Updated
subprocess.Popen
tosubprocess.run
. - Fixed grammar error (ouch).
- Updated error message handling when packages fail to upgrade.
- I know this is not wise but, updated for avalon framework 1.6.1.
For short, KPM makes apt upgrading simple and fully automatic.
KPM stands for "k4yt3x Package Manager". I developed this program to make using apt easier and safer, especially when using "apt update && apt upgrade -y && apt dist-upgrade -y". It is unsafe to use the command above since under some situations, unsafe repos can remove packages form your computer. Sometimes these removals can be critically harmful to your system, such as removing gnome desktop entirely.
KPM automatically checks packages before committing any upgrading actions. An upgrade that will not cause any removal of other packages will be considered "safe" and kpm will automatically start upgrading. An upgrade that will cause removals will be considered "unsafe" and will require the user's confirmation before taking any actions.
After upgrading, it will detect if there are automatically installed packages that are not needed anymore, and prompt to ask if the user wants to remove them (apt autoremove
). It will also execute apt autoclean
to erase old downloaded packages.
sudo pip3 install avalon_framework
sudo curl https://raw.githubusercontent.com/k4yt3x/kpm/master/kpm.py -o /usr/bin/kpm && sudo chmod 755 /usr/bin/kpm && sudo chown root: /usr/bin/kpm
git clone "https://github.com/k4yt3x/kpm.git"
cd kpm
sudo python3 kpm.py --install-kpm
That's it, now type 'kpm' to start your first automatic upgrade!
Should be easy
sudo rm -f /usr/bin/kpm
You only need to type kpm
to launch automatic upgrade once KPM has been installed onto your system. The full help section is down below. You can also use the -h
or --help
argument to show the help page.
usage: kpm [-h] [-x XINSTALL] [-m MADISON] [-s SEARCH] [--install-kpm]
[--force-upgrade]
optional arguments:
-h, --help show this help message and exit
ACTIONS:
-x XINSTALL, --xinstall XINSTALL
install without marking already-installed packages as
manually installed
-m MADISON, --madison MADISON
list all versions of a package
-s SEARCH, --search SEARCH
search in APT cache with highlight
--install-kpm install KPM to system
--force-upgrade force replacing KPM with newest version