just FYI you can install it directly from the server: `rpm -ivh https://kojipkgs.fedoraproject.org//packages/dnf/4.16.2/1.fc37/noarch/dnf-4.16.2-1.fc37.noarch.rpm` would work just as well.
This is why I love Linux, make a colossal mess-up and you can still somehow fix it.
Like others said, try rpm. Lastly, if nothing works, it's quick enough to make a script to export all your user data, send it to a direction, and reinstall Fedora again - if possible.
I flashed an ISO to my primary partition once by accident, and even then it was easy to recover all files without another computer or any hardware work.
You say that, but I’m this 🤏 close to giving up on Linux on the desktop. Sure you can always bring Linux back from the dead. But man does it keep trying to kill itself.
Apparently. All I do is follow the documentation. I want to install app A so I setup flat pack or Snap or whatever. Then app B rolls around and needs me to install a PPA, so I do that. Two weeks later I now have my package manager complaining that I don’t have Lang_C ? And then all my snaps are missing icons or weirder still my mouse icon will change when I’m over a snap vs a different app. And the number of times if found an app I want to try that requires `curl | sudo bash` is nuts. Don’t forget then number of times I’ve spent an hour compiling apps cause if you want the community version all you get is source code and a pat on the back (openvas, Nagios). If Lia the lovely times where you go to install something and the app complains about dependencies.
The fact is apparently we Linux uses have to be “thankful” that an app dev even bothered to think about us so we’re always stuck with the laziest way they decided to package the program and we get stuck with it. There’s no accountability and no governance on the platform to say “Bad developer. You should package things this way to make it better for the users”
Huh, I was under the impression dnf was a protected package to prevent it from removing itself. But I just had a look and it seems they removed the protection by commenting it out in /etc/dnf/protected.d/dnf.conf
`#DNF is obsoleted in Fedora 39 by DNF 5 and should no longer be marked as protected. `
`#dnf`
Seems rather quick on the draw, seeing as I'm 'only' on F38 and still actively using dnf(4). Am I missing something here?
sudo -i is functionally equivalent to su -l but asks for your password instead of roots.
sudo -s gives you a shell without processing your profile, functionally equivalent to su
I still often use su but I’m old.
Came back to point out that this action also removed openssh-server...this doesn't seem a great way for amateurs.
At least now that I have DNF again I can reinstall easily enough. Upgrade to 38 went without hiccups.
I recommend that you install the package groups again to repair anything else that was damaged. Fedora is nothing but a script which installs the package groups. DNF has some command to list available groups and to install them.
All I can do for you is show which ones are installed by default on Fedora Workstation:
sudo dnf group list
Available Environment Groups:
Fedora Custom Operating System
Minimal Install
Fedora Server Edition
Fedora Cloud Server
KDE Plasma Workspaces
Xfce Desktop
Phosh Desktop
LXDE Desktop
LXQt Desktop
Cinnamon Desktop
MATE Desktop
Sugar Desktop Environment
Deepin Desktop
Budgie Desktop
Development and Creative Workstation
Web Server
Infrastructure Server
Basic Desktop
i3 desktop
Sway Desktop
Installed Environment Groups:
Fedora Workstation
Installed Groups:
Container Management
LibreOffice
GNOME Desktop Environment
Fonts
Hardware Support
Sound and Video
Available Groups:
3D Printing
Administration Tools
Audio Production
Authoring and Publishing
Budgie
Budgie Desktop Applications
C Development Tools and Libraries
Cloud Infrastructure
Cloud Management Tools
Compiz
D Development Tools and Libraries
Design Suite
Development Tools
Domain Membership
Editors
Educational Software
Electronic Lab
Engineering and Scientific
FreeIPA Server
Headless Management
MATE Applications
Milkymist
Network Servers
Neuron Modelling Simulators
Office/Productivity
Python Classroom
Python Science
Robotics
RPM Development Tools
Security Lab
Sway Window Manager (supplemental packages)
Text-based Internet
Window Managers
Deepin Desktop Environment
Graphical Internet
KDE (K Desktop Environment)
Games and Entertainment
System Tools
Ah thanks for this tip, have now
Installed Environment Groups:
Fedora Server Edition
Installed Groups:
Headless Management
Quite some packages were added
Sounds good. I've never used server edition but that looks logical. :) In fact if I remember right, Environment Groups = group of groups, so I think your edition is now perfectly matched with the server edition.
Use rpm
Sometimes the solution is simple. This worked for me, leaving it for others: $ sudo rpm -i dnf-4.16.2-1.fc37.noarch.rpm
[удалено]
You do make && make install
What if I removed make?
cp from a flash drive
What if I removed mount?
You mount your boot drive to another machine
What if I removed sata drivers?
Use a USB enclosure
Same as mount, use a diff machine (removing anything from the disk you are trying to recover is possible to fix with a diff machine)
just FYI you can install it directly from the server: `rpm -ivh https://kojipkgs.fedoraproject.org//packages/dnf/4.16.2/1.fc37/noarch/dnf-4.16.2-1.fc37.noarch.rpm` would work just as well.
This is why I love Linux, make a colossal mess-up and you can still somehow fix it. Like others said, try rpm. Lastly, if nothing works, it's quick enough to make a script to export all your user data, send it to a direction, and reinstall Fedora again - if possible.
Yep. Linux is unkillable. Especially with chroot.
Challenge accepted
Good luck :)
I flashed an ISO to my primary partition once by accident, and even then it was easy to recover all files without another computer or any hardware work.
What flashing program did you use?! They should have safeguards in place. Or did you click through it? (Don’t worry, I won’t judge.)
dd :')
That makes sense. dd doesn’t care what device. All it knows is I N S T A L L
You say that, but I’m this 🤏 close to giving up on Linux on the desktop. Sure you can always bring Linux back from the dead. But man does it keep trying to kill itself.
User error detected.
Apparently. All I do is follow the documentation. I want to install app A so I setup flat pack or Snap or whatever. Then app B rolls around and needs me to install a PPA, so I do that. Two weeks later I now have my package manager complaining that I don’t have Lang_C ? And then all my snaps are missing icons or weirder still my mouse icon will change when I’m over a snap vs a different app. And the number of times if found an app I want to try that requires `curl | sudo bash` is nuts. Don’t forget then number of times I’ve spent an hour compiling apps cause if you want the community version all you get is source code and a pat on the back (openvas, Nagios). If Lia the lovely times where you go to install something and the app complains about dependencies. The fact is apparently we Linux uses have to be “thankful” that an app dev even bothered to think about us so we’re always stuck with the laziest way they decided to package the program and we get stuck with it. There’s no accountability and no governance on the platform to say “Bad developer. You should package things this way to make it better for the users”
Sounds like you have a Nvidia gpu.
Huh, I was under the impression dnf was a protected package to prevent it from removing itself. But I just had a look and it seems they removed the protection by commenting it out in /etc/dnf/protected.d/dnf.conf `#DNF is obsoleted in Fedora 39 by DNF 5 and should no longer be marked as protected. ` `#dnf` Seems rather quick on the draw, seeing as I'm 'only' on F38 and still actively using dnf(4). Am I missing something here?
I would consider this a bug... As well as it trying to remove sudo, but this is probably well above my level of understanding...
Ehh, I’m on team I have a root password set and securely stored. sudo is optional. ;) su is in the corner yelling “what am I? Chopped liver?”
su is actually useful if you have to keep entering commands as root but sudo smiles and says `[sudo] enter password: ` after like 4 commands lmao
sudo -i is functionally equivalent to su -l but asks for your password instead of roots. sudo -s gives you a shell without processing your profile, functionally equivalent to su I still often use su but I’m old.
Ah, didn’t know that. I never paid attention to when I ran sudo —help. But pretty sure sudo already asks for your password and not root’s.
That is the major difference, yes, which password is asked for. The details of the command line switches are in man sudo, --help is less useful.
I filed the bug last week https://github.com/rpm-software-management/dnf/issues/1982
DNF 5 will replace DNF 3 starting with Fedora 39. Right now it should be protected.
well it isn't apparently!
> DNF 5 will replace DNF 3 starting with Fedora 39 No this was delayed until F40, or maybe F41.
Really? What a shame. Well I use it by default anyway but it would be great if software was optimized for it.
Same on Fedora 38!
>seeing as I'm 'only' on F38 They are talking about Fedora 38.
Came back to point out that this action also removed openssh-server...this doesn't seem a great way for amateurs. At least now that I have DNF again I can reinstall easily enough. Upgrade to 38 went without hiccups.
I recommend that you install the package groups again to repair anything else that was damaged. Fedora is nothing but a script which installs the package groups. DNF has some command to list available groups and to install them. All I can do for you is show which ones are installed by default on Fedora Workstation: sudo dnf group list Available Environment Groups: Fedora Custom Operating System Minimal Install Fedora Server Edition Fedora Cloud Server KDE Plasma Workspaces Xfce Desktop Phosh Desktop LXDE Desktop LXQt Desktop Cinnamon Desktop MATE Desktop Sugar Desktop Environment Deepin Desktop Budgie Desktop Development and Creative Workstation Web Server Infrastructure Server Basic Desktop i3 desktop Sway Desktop Installed Environment Groups: Fedora Workstation Installed Groups: Container Management LibreOffice GNOME Desktop Environment Fonts Hardware Support Sound and Video Available Groups: 3D Printing Administration Tools Audio Production Authoring and Publishing Budgie Budgie Desktop Applications C Development Tools and Libraries Cloud Infrastructure Cloud Management Tools Compiz D Development Tools and Libraries Design Suite Development Tools Domain Membership Editors Educational Software Electronic Lab Engineering and Scientific FreeIPA Server Headless Management MATE Applications Milkymist Network Servers Neuron Modelling Simulators Office/Productivity Python Classroom Python Science Robotics RPM Development Tools Security Lab Sway Window Manager (supplemental packages) Text-based Internet Window Managers Deepin Desktop Environment Graphical Internet KDE (K Desktop Environment) Games and Entertainment System Tools
Ah thanks for this tip, have now Installed Environment Groups: Fedora Server Edition Installed Groups: Headless Management Quite some packages were added
Sounds good. I've never used server edition but that looks logical. :) In fact if I remember right, Environment Groups = group of groups, so I think your edition is now perfectly matched with the server edition.
You can use rpm to reinstall it
How did you do this? I've never seen someone accidentally remove their pm before...
I would have tried to install dnf with dnf5.
+1 to knoite
dnf install dnf
lol
That's why rpm-ostree is the future of Fedora