summaryrefslogtreecommitdiff
path: root/.cheat/yum
diff options
context:
space:
mode:
authorVito Graffagnino <vito@graffagnino.xyz>2020-09-08 18:10:49 +0100
committerVito Graffagnino <vito@graffagnino.xyz>2020-09-08 18:10:49 +0100
commit3b0142cedcde39e4c2097ecd916a870a3ced5ec6 (patch)
tree2116c49a845dfc0945778f2aa3e2118d72be428b /.cheat/yum
parent8cc927e930d5b6aafe3e9862a61e81705479a1b4 (diff)
Added the relevent parts of the .config directory. Alss add ssh config
Diffstat (limited to '.cheat/yum')
-rw-r--r--.cheat/yum261
1 files changed, 261 insertions, 0 deletions
diff --git a/.cheat/yum b/.cheat/yum
new file mode 100644
index 0000000..c4dc4af
--- /dev/null
+++ b/.cheat/yum
@@ -0,0 +1,261 @@
+#----------------------------------------------
+#
+# To install the latest version of a package:
+
+$ yum install {package-name}
+
+#
+#----------------------------------------------
+#
+# To reinstall a package:
+
+$ yum reinstall {package-name}
+
+#
+#----------------------------------------------
+#
+# To perform a local install:
+
+$ yum localinstall {package-name}
+
+#
+#----------------------------------------------
+#
+# To install all updates/patches
+
+$ yum update
+
+#
+#----------------------------------------------
+#
+# To fix an interrupted update
+
+$ yum-complete-transaction
+
+# If this doesn't work type in the following:
+
+$ yum history
+
+# This will list the yum transactions. A * will indicate an
+# interrupted/aborted transaction. Take note of the transaction number,
+# then yupe the following:
+
+$ yum history redo force-reinstall [transaction ID]
+
+# Alternatively, undo and then redo the transaction as follows:
+
+$ yum history undo [transaction ID]
+$ yum history redo [transaction ID]
+
+#
+#----------------------------------------------
+#
+# To install updates for specific package
+
+$ yum update {package-name}
+
+#
+#----------------------------------------------
+#
+# To downgrade a specific package
+
+$ yum downgrade {package-name}
+
+#
+#----------------------------------------------
+#
+# To updates package to specific version.
+## First find a list of all duplicates
+
+$ yum --showduplicates list {package-name}
+
+## Now update to particular version
+
+$ yum update-to {package-name}-{version}
+
+#
+#----------------------------------------------
+#
+# To display a list of updated software and security fixes
+
+$ yum list updates
+
+#
+#----------------------------------------------
+#
+# To find out whether updates exist for already installed packages
+
+$ yum check-update
+
+#
+#----------------------------------------------
+#
+# To remove a package:
+
+$ yum remove {package-name}
+$ yum erase {package-name}
+
+#
+#----------------------------------------------
+#
+# To remove unneeded packages/deps:
+
+$ yum autoremove
+
+#
+#----------------------------------------------
+#
+# To search for a package:
+
+$ yum search {package-name}
+
+#
+#----------------------------------------------
+#
+# To find what package installs a program:
+
+$ yum whatprovides </path/to/program>
+
+#
+#----------------------------------------------
+#
+# To find the dependencies of a package:
+
+$ yum deplist {package-name}
+
+#
+#----------------------------------------------
+#
+# To find information about a package:
+
+$ yum info {package-name}
+
+#
+#----------------------------------------------
+#
+# List all installed packages
+
+$ yum list installed
+
+#
+#----------------------------------------------
+#
+# List packages containing a certain keyword:
+
+$ yum list <package_name_or_word_to_search>
+
+#
+#----------------------------------------------
+#
+# To download the source RPM for a package:
+
+$ yumdownloader --source {package-name}
+
+# (You have to install yumdownloader first, which is installed by the yum-utils package)
+#
+#----------------------------------------------
+#
+# Clean Yum Cache
+
+$ yum clean all
+
+## To check local rpm database for problems
+
+$ yum check
+
+#
+#----------------------------------------------
+#
+# List currently enabled repositories:
+
+$ yum repolist
+
+#
+#----------------------------------------------
+#
+# To see info about enabled repositories:
+
+$ yum repoinfo {repo-name}
+
+#
+#----------------------------------------------
+#
+# To work with a given repository:
+
+$ yum repo-pkgs {repo-name} <list|installed|remove|upgrade|reinstall|info> {package-name}
+
+#
+#----------------------------------------------
+#
+# To add a yum repo
+
+$ yum-config-manager --add-repo {repo-url}
+
+#
+#----------------------------------------------
+#
+# To enable a yum repo
+
+$ yum-config-manager --enable {repo-id}
+
+## use `yum repolist all` to list all repo ids.
+
+#
+#----------------------------------------------
+#
+# To disable a yum repo
+
+$ yum-config-manager --disable {repo-id}
+
+#
+#----------------------------------------------
+#
+# To view yum history
+
+$ yum history
+
+or
+
+$ yum history list
+
+# Lots of things that you can do with this. Checkout
+# https://www.cyberciti.biz/faq/yum-history-command/
+
+#
+#----------------------------------------------
+#
+# To list available groups from all yum repos.
+#
+
+$ yum groups list
+
+or
+
+$ yum grouplist
+
+#
+#----------------------------------------------
+#
+# To view group description/list of packages it contains etc.
+#
+
+$ yum groups info "GROUP NAME"
+
+#
+#----------------------------------------------
+#
+# To install a group of packages
+#
+
+$ yum groups install "GROUP NAME"
+
+#
+#----------------------------------------------
+#
+# To remove a group of packages
+#
+
+$ yum groups remove "GROUP NAME"
+
+#
+#----------------------------------------------